diff options
author | Jesús <heckyel@hyperbola.info> | 2019-08-18 21:14:58 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-08-18 21:14:58 -0500 |
commit | 2eed7b082f83630301e51f57ca8394de228a8605 (patch) | |
tree | 1d19962d22d30f99317d9276e4bae7744fc93fc2 /public/system/storage/vendor/symfony | |
download | librecart-2eed7b082f83630301e51f57ca8394de228a8605.tar.lz librecart-2eed7b082f83630301e51f57ca8394de228a8605.tar.xz librecart-2eed7b082f83630301e51f57ca8394de228a8605.zip |
first commit
Diffstat (limited to 'public/system/storage/vendor/symfony')
541 files changed, 62899 insertions, 0 deletions
diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/Ctype.php b/public/system/storage/vendor/symfony/polyfill-ctype/Ctype.php new file mode 100644 index 0000000..58414dc --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/Ctype.php @@ -0,0 +1,227 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Ctype; + +/** + * Ctype implementation through regex. + * + * @internal + * + * @author Gert de Pagter <BackEndTea@gmail.com> + */ +final class Ctype +{ + /** + * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. + * + * @see https://php.net/ctype-alnum + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_alnum($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text); + } + + /** + * Returns TRUE if every character in text is a letter, FALSE otherwise. + * + * @see https://php.net/ctype-alpha + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_alpha($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text); + } + + /** + * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise. + * + * @see https://php.net/ctype-cntrl + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_cntrl($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text); + } + + /** + * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. + * + * @see https://php.net/ctype-digit + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_digit($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text); + } + + /** + * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise. + * + * @see https://php.net/ctype-graph + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_graph($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text); + } + + /** + * Returns TRUE if every character in text is a lowercase letter. + * + * @see https://php.net/ctype-lower + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_lower($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text); + } + + /** + * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all. + * + * @see https://php.net/ctype-print + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_print($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text); + } + + /** + * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise. + * + * @see https://php.net/ctype-punct + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_punct($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text); + } + + /** + * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters. + * + * @see https://php.net/ctype-space + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_space($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text); + } + + /** + * Returns TRUE if every character in text is an uppercase letter. + * + * @see https://php.net/ctype-upper + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_upper($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text); + } + + /** + * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise. + * + * @see https://php.net/ctype-xdigit + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_xdigit($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text); + } + + /** + * Converts integers to their char versions according to normal ctype behaviour, if needed. + * + * If an integer between -128 and 255 inclusive is provided, + * it is interpreted as the ASCII value of a single character + * (negative values have 256 added in order to allow characters in the Extended ASCII range). + * Any other integer is interpreted as a string containing the decimal digits of the integer. + * + * @param string|int $int + * + * @return mixed + */ + private static function convert_int_to_char_for_ctype($int) + { + if (!\is_int($int)) { + return $int; + } + + if ($int < -128 || $int > 255) { + return (string) $int; + } + + if ($int < 0) { + $int += 256; + } + + return \chr($int); + } +} diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/LICENSE b/public/system/storage/vendor/symfony/polyfill-ctype/LICENSE new file mode 100644 index 0000000..3f853aa --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/README.md b/public/system/storage/vendor/symfony/polyfill-ctype/README.md new file mode 100644 index 0000000..8add1ab --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/README.md @@ -0,0 +1,12 @@ +Symfony Polyfill / Ctype +======================== + +This component provides `ctype_*` functions to users who run php versions without the ctype extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/bootstrap.php b/public/system/storage/vendor/symfony/polyfill-ctype/bootstrap.php new file mode 100644 index 0000000..14d1d0f --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/bootstrap.php @@ -0,0 +1,26 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Ctype as p; + +if (!function_exists('ctype_alnum')) { + function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } + function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } + function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } + function ctype_digit($text) { return p\Ctype::ctype_digit($text); } + function ctype_graph($text) { return p\Ctype::ctype_graph($text); } + function ctype_lower($text) { return p\Ctype::ctype_lower($text); } + function ctype_print($text) { return p\Ctype::ctype_print($text); } + function ctype_punct($text) { return p\Ctype::ctype_punct($text); } + function ctype_space($text) { return p\Ctype::ctype_space($text); } + function ctype_upper($text) { return p\Ctype::ctype_upper($text); } + function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } +} diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/composer.json b/public/system/storage/vendor/symfony/polyfill-ctype/composer.json new file mode 100644 index 0000000..c24e20c --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/polyfill-ctype", + "type": "library", + "description": "Symfony polyfill for ctype functions", + "keywords": ["polyfill", "compatibility", "portable", "ctype"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + } +} diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/LICENSE b/public/system/storage/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 0000000..4cd8bdd --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/Mbstring.php b/public/system/storage/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 0000000..a5e4a8f --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,800 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas <p@tchwork.com> + * + * @internal + */ +final class Mbstring +{ + const MB_CASE_FOLD = PHP_INT_MAX; + + private static $encodingList = array('ASCII', 'UTF-8'); + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + private static $caseFold = array( + array('µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"), + array('μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'), + ); + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) + { + $vars = array(&$a, &$b, &$c, &$d, &$e, &$f); + + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return Mbstring::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s); + } else { + if (MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) { + self::$internalEncoding = $encoding; + + return true; + } + + return false; + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($lang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $lang; + + return true; + } + + return false; + } + + public static function mb_list_encodings() + { + return array('UTF-8'); + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return array('utf8'); + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING); + + return false; + } + + return iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (0 === strcasecmp($c, 'none')) { + return true; + } + + return null !== $c ? false : 'none'; + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrchr($haystack, $needle, $part); + } + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = array( + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ); + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } +} diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/README.md b/public/system/storage/vendor/symfony/polyfill-mbstring/README.md new file mode 100644 index 0000000..342e828 --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](http://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 0000000..e6fbfa6 --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1096 @@ +<?php + +return array( + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Á' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Å' => 'å', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'Ì' => 'ì', + 'Í' => 'í', + 'Î' => 'î', + 'Ï' => 'ï', + 'Ð' => 'ð', + 'Ñ' => 'ñ', + 'Ò' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ý' => 'ý', + 'Þ' => 'þ', + 'Ā' => 'ā', + 'Ă' => 'ă', + 'Ą' => 'ą', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'Ċ' => 'ċ', + 'Č' => 'č', + 'Ď' => 'ď', + 'Đ' => 'đ', + 'Ē' => 'ē', + 'Ĕ' => 'ĕ', + 'Ė' => 'ė', + 'Ę' => 'ę', + 'Ě' => 'ě', + 'Ĝ' => 'ĝ', + 'Ğ' => 'ğ', + 'Ġ' => 'ġ', + 'Ģ' => 'ģ', + 'Ĥ' => 'ĥ', + 'Ħ' => 'ħ', + 'Ĩ' => 'ĩ', + 'Ī' => 'ī', + 'Ĭ' => 'ĭ', + 'Į' => 'į', + 'İ' => 'i', + 'IJ' => 'ij', + 'Ĵ' => 'ĵ', + 'Ķ' => 'ķ', + 'Ĺ' => 'ĺ', + 'Ļ' => 'ļ', + 'Ľ' => 'ľ', + 'Ŀ' => 'ŀ', + 'Ł' => 'ł', + 'Ń' => 'ń', + 'Ņ' => 'ņ', + 'Ň' => 'ň', + 'Ŋ' => 'ŋ', + 'Ō' => 'ō', + 'Ŏ' => 'ŏ', + 'Ő' => 'ő', + 'Œ' => 'œ', + 'Ŕ' => 'ŕ', + 'Ŗ' => 'ŗ', + 'Ř' => 'ř', + 'Ś' => 'ś', + 'Ŝ' => 'ŝ', + 'Ş' => 'ş', + 'Š' => 'š', + 'Ţ' => 'ţ', + 'Ť' => 'ť', + 'Ŧ' => 'ŧ', + 'Ũ' => 'ũ', + 'Ū' => 'ū', + 'Ŭ' => 'ŭ', + 'Ů' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Ŵ' => 'ŵ', + 'Ŷ' => 'ŷ', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Ż' => 'ż', + 'Ž' => 'ž', + 'Ɓ' => 'ɓ', + 'Ƃ' => 'ƃ', + 'Ƅ' => 'ƅ', + 'Ɔ' => 'ɔ', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'ɖ', + 'Ɗ' => 'ɗ', + 'Ƌ' => 'ƌ', + 'Ǝ' => 'ǝ', + 'Ə' => 'ə', + 'Ɛ' => 'ɛ', + 'Ƒ' => 'ƒ', + 'Ɠ' => 'ɠ', + 'Ɣ' => 'ɣ', + 'Ɩ' => 'ɩ', + 'Ɨ' => 'ɨ', + 'Ƙ' => 'ƙ', + 'Ɯ' => 'ɯ', + 'Ɲ' => 'ɲ', + 'Ɵ' => 'ɵ', + 'Ơ' => 'ơ', + 'Ƣ' => 'ƣ', + 'Ƥ' => 'ƥ', + 'Ʀ' => 'ʀ', + 'Ƨ' => 'ƨ', + 'Ʃ' => 'ʃ', + 'Ƭ' => 'ƭ', + 'Ʈ' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ʊ', + 'Ʋ' => 'ʋ', + 'Ƴ' => 'ƴ', + 'Ƶ' => 'ƶ', + 'Ʒ' => 'ʒ', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'DŽ' => 'dž', + 'Dž' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'NJ' => 'nj', + 'Nj' => 'nj', + 'Ǎ' => 'ǎ', + 'Ǐ' => 'ǐ', + 'Ǒ' => 'ǒ', + 'Ǔ' => 'ǔ', + 'Ǖ' => 'ǖ', + 'Ǘ' => 'ǘ', + 'Ǚ' => 'ǚ', + 'Ǜ' => 'ǜ', + 'Ǟ' => 'ǟ', + 'Ǡ' => 'ǡ', + 'Ǣ' => 'ǣ', + 'Ǥ' => 'ǥ', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'ǩ', + 'Ǫ' => 'ǫ', + 'Ǭ' => 'ǭ', + 'Ǯ' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ǵ' => 'ǵ', + 'Ƕ' => 'ƕ', + 'Ƿ' => 'ƿ', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'ǻ', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'ǿ', + 'Ȁ' => 'ȁ', + 'Ȃ' => 'ȃ', + 'Ȅ' => 'ȅ', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'Ȋ' => 'ȋ', + 'Ȍ' => 'ȍ', + 'Ȏ' => 'ȏ', + 'Ȑ' => 'ȑ', + 'Ȓ' => 'ȓ', + 'Ȕ' => 'ȕ', + 'Ȗ' => 'ȗ', + 'Ș' => 'ș', + 'Ț' => 'ț', + 'Ȝ' => 'ȝ', + 'Ȟ' => 'ȟ', + 'Ƞ' => 'ƞ', + 'Ȣ' => 'ȣ', + 'Ȥ' => 'ȥ', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'ȩ', + 'Ȫ' => 'ȫ', + 'Ȭ' => 'ȭ', + 'Ȯ' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'ⱥ', + 'Ȼ' => 'ȼ', + 'Ƚ' => 'ƚ', + 'Ⱦ' => 'ⱦ', + 'Ɂ' => 'ɂ', + 'Ƀ' => 'ƀ', + 'Ʉ' => 'ʉ', + 'Ʌ' => 'ʌ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'Ɋ' => 'ɋ', + 'Ɍ' => 'ɍ', + 'Ɏ' => 'ɏ', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'ͷ', + 'Ϳ' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'Ό' => 'ό', + 'Ύ' => 'ύ', + 'Ώ' => 'ώ', + 'Α' => 'α', + 'Β' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Ν' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'π', + 'Ρ' => 'ρ', + 'Σ' => 'σ', + 'Τ' => 'τ', + 'Υ' => 'υ', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ϊ', + 'Ϋ' => 'ϋ', + 'Ϗ' => 'ϗ', + 'Ϙ' => 'ϙ', + 'Ϛ' => 'ϛ', + 'Ϝ' => 'ϝ', + 'Ϟ' => 'ϟ', + 'Ϡ' => 'ϡ', + 'Ϣ' => 'ϣ', + 'Ϥ' => 'ϥ', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'ϩ', + 'Ϫ' => 'ϫ', + 'Ϭ' => 'ϭ', + 'Ϯ' => 'ϯ', + 'ϴ' => 'θ', + 'Ϸ' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'ϻ', + 'Ͻ' => 'ͻ', + 'Ͼ' => 'ͼ', + 'Ͽ' => 'ͽ', + 'Ѐ' => 'ѐ', + 'Ё' => 'ё', + 'Ђ' => 'ђ', + 'Ѓ' => 'ѓ', + 'Є' => 'є', + 'Ѕ' => 'ѕ', + 'І' => 'і', + 'Ї' => 'ї', + 'Ј' => 'ј', + 'Љ' => 'љ', + 'Њ' => 'њ', + 'Ћ' => 'ћ', + 'Ќ' => 'ќ', + 'Ѝ' => 'ѝ', + 'Ў' => 'ў', + 'Џ' => 'џ', + 'А' => 'а', + 'Б' => 'б', + 'В' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Н' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'р', + 'С' => 'с', + 'Т' => 'т', + 'У' => 'у', + 'Ф' => 'ф', + 'Х' => 'х', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ъ', + 'Ы' => 'ы', + 'Ь' => 'ь', + 'Э' => 'э', + 'Ю' => 'ю', + 'Я' => 'я', + 'Ѡ' => 'ѡ', + 'Ѣ' => 'ѣ', + 'Ѥ' => 'ѥ', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'ѩ', + 'Ѫ' => 'ѫ', + 'Ѭ' => 'ѭ', + 'Ѯ' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ѵ' => 'ѵ', + 'Ѷ' => 'ѷ', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'ѻ', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'ѿ', + 'Ҁ' => 'ҁ', + 'Ҋ' => 'ҋ', + 'Ҍ' => 'ҍ', + 'Ҏ' => 'ҏ', + 'Ґ' => 'ґ', + 'Ғ' => 'ғ', + 'Ҕ' => 'ҕ', + 'Җ' => 'җ', + 'Ҙ' => 'ҙ', + 'Қ' => 'қ', + 'Ҝ' => 'ҝ', + 'Ҟ' => 'ҟ', + 'Ҡ' => 'ҡ', + 'Ң' => 'ң', + 'Ҥ' => 'ҥ', + 'Ҧ' => 'ҧ', + 'Ҩ' => 'ҩ', + 'Ҫ' => 'ҫ', + 'Ҭ' => 'ҭ', + 'Ү' => 'ү', + 'Ұ' => 'ұ', + 'Ҳ' => 'ҳ', + 'Ҵ' => 'ҵ', + 'Ҷ' => 'ҷ', + 'Ҹ' => 'ҹ', + 'Һ' => 'һ', + 'Ҽ' => 'ҽ', + 'Ҿ' => 'ҿ', + 'Ӏ' => 'ӏ', + 'Ӂ' => 'ӂ', + 'Ӄ' => 'ӄ', + 'Ӆ' => 'ӆ', + 'Ӈ' => 'ӈ', + 'Ӊ' => 'ӊ', + 'Ӌ' => 'ӌ', + 'Ӎ' => 'ӎ', + 'Ӑ' => 'ӑ', + 'Ӓ' => 'ӓ', + 'Ӕ' => 'ӕ', + 'Ӗ' => 'ӗ', + 'Ә' => 'ә', + 'Ӛ' => 'ӛ', + 'Ӝ' => 'ӝ', + 'Ӟ' => 'ӟ', + 'Ӡ' => 'ӡ', + 'Ӣ' => 'ӣ', + 'Ӥ' => 'ӥ', + 'Ӧ' => 'ӧ', + 'Ө' => 'ө', + 'Ӫ' => 'ӫ', + 'Ӭ' => 'ӭ', + 'Ӯ' => 'ӯ', + 'Ӱ' => 'ӱ', + 'Ӳ' => 'ӳ', + 'Ӵ' => 'ӵ', + 'Ӷ' => 'ӷ', + 'Ӹ' => 'ӹ', + 'Ӻ' => 'ӻ', + 'Ӽ' => 'ӽ', + 'Ӿ' => 'ӿ', + 'Ԁ' => 'ԁ', + 'Ԃ' => 'ԃ', + 'Ԅ' => 'ԅ', + 'Ԇ' => 'ԇ', + 'Ԉ' => 'ԉ', + 'Ԋ' => 'ԋ', + 'Ԍ' => 'ԍ', + 'Ԏ' => 'ԏ', + 'Ԑ' => 'ԑ', + 'Ԓ' => 'ԓ', + 'Ԕ' => 'ԕ', + 'Ԗ' => 'ԗ', + 'Ԙ' => 'ԙ', + 'Ԛ' => 'ԛ', + 'Ԝ' => 'ԝ', + 'Ԟ' => 'ԟ', + 'Ԡ' => 'ԡ', + 'Ԣ' => 'ԣ', + 'Ԥ' => 'ԥ', + 'Ԧ' => 'ԧ', + 'Ԩ' => 'ԩ', + 'Ԫ' => 'ԫ', + 'Ԭ' => 'ԭ', + 'Ԯ' => 'ԯ', + 'Ա' => 'ա', + 'Բ' => 'բ', + 'Գ' => 'գ', + 'Դ' => 'դ', + 'Ե' => 'ե', + 'Զ' => 'զ', + 'Է' => 'է', + 'Ը' => 'ը', + 'Թ' => 'թ', + 'Ժ' => 'ժ', + 'Ի' => 'ի', + 'Լ' => 'լ', + 'Խ' => 'խ', + 'Ծ' => 'ծ', + 'Կ' => 'կ', + 'Հ' => 'հ', + 'Ձ' => 'ձ', + 'Ղ' => 'ղ', + 'Ճ' => 'ճ', + 'Մ' => 'մ', + 'Յ' => 'յ', + 'Ն' => 'ն', + 'Շ' => 'շ', + 'Ո' => 'ո', + 'Չ' => 'չ', + 'Պ' => 'պ', + 'Ջ' => 'ջ', + 'Ռ' => 'ռ', + 'Ս' => 'ս', + 'Վ' => 'վ', + 'Տ' => 'տ', + 'Ր' => 'ր', + 'Ց' => 'ց', + 'Ւ' => 'ւ', + 'Փ' => 'փ', + 'Ք' => 'ք', + 'Օ' => 'օ', + 'Ֆ' => 'ֆ', + 'Ⴀ' => 'ⴀ', + 'Ⴁ' => 'ⴁ', + 'Ⴂ' => 'ⴂ', + 'Ⴃ' => 'ⴃ', + 'Ⴄ' => 'ⴄ', + 'Ⴅ' => 'ⴅ', + 'Ⴆ' => 'ⴆ', + 'Ⴇ' => 'ⴇ', + 'Ⴈ' => 'ⴈ', + 'Ⴉ' => 'ⴉ', + 'Ⴊ' => 'ⴊ', + 'Ⴋ' => 'ⴋ', + 'Ⴌ' => 'ⴌ', + 'Ⴍ' => 'ⴍ', + 'Ⴎ' => 'ⴎ', + 'Ⴏ' => 'ⴏ', + 'Ⴐ' => 'ⴐ', + 'Ⴑ' => 'ⴑ', + 'Ⴒ' => 'ⴒ', + 'Ⴓ' => 'ⴓ', + 'Ⴔ' => 'ⴔ', + 'Ⴕ' => 'ⴕ', + 'Ⴖ' => 'ⴖ', + 'Ⴗ' => 'ⴗ', + 'Ⴘ' => 'ⴘ', + 'Ⴙ' => 'ⴙ', + 'Ⴚ' => 'ⴚ', + 'Ⴛ' => 'ⴛ', + 'Ⴜ' => 'ⴜ', + 'Ⴝ' => 'ⴝ', + 'Ⴞ' => 'ⴞ', + 'Ⴟ' => 'ⴟ', + 'Ⴠ' => 'ⴠ', + 'Ⴡ' => 'ⴡ', + 'Ⴢ' => 'ⴢ', + 'Ⴣ' => 'ⴣ', + 'Ⴤ' => 'ⴤ', + 'Ⴥ' => 'ⴥ', + 'Ⴧ' => 'ⴧ', + 'Ⴭ' => 'ⴭ', + 'Ḁ' => 'ḁ', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'ḍ', + 'Ḏ' => 'ḏ', + 'Ḑ' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'ḝ', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'Ṁ' => 'ṁ', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'ṅ', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'ṍ', + 'Ṏ' => 'ṏ', + 'Ṑ' => 'ṑ', + 'Ṓ' => 'ṓ', + 'Ṕ' => 'ṕ', + 'Ṗ' => 'ṗ', + 'Ṙ' => 'ṙ', + 'Ṛ' => 'ṛ', + 'Ṝ' => 'ṝ', + 'Ṟ' => 'ṟ', + 'Ṡ' => 'ṡ', + 'Ṣ' => 'ṣ', + 'Ṥ' => 'ṥ', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'ṭ', + 'Ṯ' => 'ṯ', + 'Ṱ' => 'ṱ', + 'Ṳ' => 'ṳ', + 'Ṵ' => 'ṵ', + 'Ṷ' => 'ṷ', + 'Ṹ' => 'ṹ', + 'Ṻ' => 'ṻ', + 'Ṽ' => 'ṽ', + 'Ṿ' => 'ṿ', + 'Ẁ' => 'ẁ', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'ẍ', + 'Ẏ' => 'ẏ', + 'Ẑ' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'ề', + 'Ể' => 'ể', + 'Ễ' => 'ễ', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'ọ', + 'Ỏ' => 'ỏ', + 'Ố' => 'ố', + 'Ồ' => 'ồ', + 'Ổ' => 'ổ', + 'Ỗ' => 'ỗ', + 'Ộ' => 'ộ', + 'Ớ' => 'ớ', + 'Ờ' => 'ờ', + 'Ở' => 'ở', + 'Ỡ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'ử', + 'Ữ' => 'ữ', + 'Ự' => 'ự', + 'Ỳ' => 'ỳ', + 'Ỵ' => 'ỵ', + 'Ỷ' => 'ỷ', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'ỻ', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'ἀ', + 'Ἁ' => 'ἁ', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'Ἅ' => 'ἅ', + 'Ἆ' => 'ἆ', + 'Ἇ' => 'ἇ', + 'Ἐ' => 'ἐ', + 'Ἑ' => 'ἑ', + 'Ἒ' => 'ἒ', + 'Ἓ' => 'ἓ', + 'Ἔ' => 'ἔ', + 'Ἕ' => 'ἕ', + 'Ἠ' => 'ἠ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'ἢ', + 'Ἣ' => 'ἣ', + 'Ἤ' => 'ἤ', + 'Ἥ' => 'ἥ', + 'Ἦ' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'ἰ', + 'Ἱ' => 'ἱ', + 'Ἲ' => 'ἲ', + 'Ἳ' => 'ἳ', + 'Ἴ' => 'ἴ', + 'Ἵ' => 'ἵ', + 'Ἶ' => 'ἶ', + 'Ἷ' => 'ἷ', + 'Ὀ' => 'ὀ', + 'Ὁ' => 'ὁ', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'Ὅ' => 'ὅ', + 'Ὑ' => 'ὑ', + 'Ὓ' => 'ὓ', + 'Ὕ' => 'ὕ', + 'Ὗ' => 'ὗ', + 'Ὠ' => 'ὠ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'ὢ', + 'Ὣ' => 'ὣ', + 'Ὤ' => 'ὤ', + 'Ὥ' => 'ὥ', + 'Ὦ' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'ᾀ', + 'ᾉ' => 'ᾁ', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'ᾍ' => 'ᾅ', + 'ᾎ' => 'ᾆ', + 'ᾏ' => 'ᾇ', + 'ᾘ' => 'ᾐ', + 'ᾙ' => 'ᾑ', + 'ᾚ' => 'ᾒ', + 'ᾛ' => 'ᾓ', + 'ᾜ' => 'ᾔ', + 'ᾝ' => 'ᾕ', + 'ᾞ' => 'ᾖ', + 'ᾟ' => 'ᾗ', + 'ᾨ' => 'ᾠ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'ᾢ', + 'ᾫ' => 'ᾣ', + 'ᾬ' => 'ᾤ', + 'ᾭ' => 'ᾥ', + 'ᾮ' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'ᾰ', + 'Ᾱ' => 'ᾱ', + 'Ὰ' => 'ὰ', + 'Ά' => 'ά', + 'ᾼ' => 'ᾳ', + 'Ὲ' => 'ὲ', + 'Έ' => 'έ', + 'Ὴ' => 'ὴ', + 'Ή' => 'ή', + 'ῌ' => 'ῃ', + 'Ῐ' => 'ῐ', + 'Ῑ' => 'ῑ', + 'Ὶ' => 'ὶ', + 'Ί' => 'ί', + 'Ῠ' => 'ῠ', + 'Ῡ' => 'ῡ', + 'Ὺ' => 'ὺ', + 'Ύ' => 'ύ', + 'Ῥ' => 'ῥ', + 'Ὸ' => 'ὸ', + 'Ό' => 'ό', + 'Ὼ' => 'ὼ', + 'Ώ' => 'ώ', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'Å' => 'å', + 'Ⅎ' => 'ⅎ', + 'Ⅰ' => 'ⅰ', + 'Ⅱ' => 'ⅱ', + 'Ⅲ' => 'ⅲ', + 'Ⅳ' => 'ⅳ', + 'Ⅴ' => 'ⅴ', + 'Ⅵ' => 'ⅵ', + 'Ⅶ' => 'ⅶ', + 'Ⅷ' => 'ⅷ', + 'Ⅸ' => 'ⅸ', + 'Ⅹ' => 'ⅹ', + 'Ⅺ' => 'ⅺ', + 'Ⅻ' => 'ⅻ', + 'Ⅼ' => 'ⅼ', + 'Ⅽ' => 'ⅽ', + 'Ⅾ' => 'ⅾ', + 'Ⅿ' => 'ⅿ', + 'Ↄ' => 'ↄ', + 'Ⓐ' => 'ⓐ', + 'Ⓑ' => 'ⓑ', + 'Ⓒ' => 'ⓒ', + 'Ⓓ' => 'ⓓ', + 'Ⓔ' => 'ⓔ', + 'Ⓕ' => 'ⓕ', + 'Ⓖ' => 'ⓖ', + 'Ⓗ' => 'ⓗ', + 'Ⓘ' => 'ⓘ', + 'Ⓙ' => 'ⓙ', + 'Ⓚ' => 'ⓚ', + 'Ⓛ' => 'ⓛ', + 'Ⓜ' => 'ⓜ', + 'Ⓝ' => 'ⓝ', + 'Ⓞ' => 'ⓞ', + 'Ⓟ' => 'ⓟ', + 'Ⓠ' => 'ⓠ', + 'Ⓡ' => 'ⓡ', + 'Ⓢ' => 'ⓢ', + 'Ⓣ' => 'ⓣ', + 'Ⓤ' => 'ⓤ', + 'Ⓥ' => 'ⓥ', + 'Ⓦ' => 'ⓦ', + 'Ⓧ' => 'ⓧ', + 'Ⓨ' => 'ⓨ', + 'Ⓩ' => 'ⓩ', + 'Ⰰ' => 'ⰰ', + 'Ⰱ' => 'ⰱ', + 'Ⰲ' => 'ⰲ', + 'Ⰳ' => 'ⰳ', + 'Ⰴ' => 'ⰴ', + 'Ⰵ' => 'ⰵ', + 'Ⰶ' => 'ⰶ', + 'Ⰷ' => 'ⰷ', + 'Ⰸ' => 'ⰸ', + 'Ⰹ' => 'ⰹ', + 'Ⰺ' => 'ⰺ', + 'Ⰻ' => 'ⰻ', + 'Ⰼ' => 'ⰼ', + 'Ⰽ' => 'ⰽ', + 'Ⰾ' => 'ⰾ', + 'Ⰿ' => 'ⰿ', + 'Ⱀ' => 'ⱀ', + 'Ⱁ' => 'ⱁ', + 'Ⱂ' => 'ⱂ', + 'Ⱃ' => 'ⱃ', + 'Ⱄ' => 'ⱄ', + 'Ⱅ' => 'ⱅ', + 'Ⱆ' => 'ⱆ', + 'Ⱇ' => 'ⱇ', + 'Ⱈ' => 'ⱈ', + 'Ⱉ' => 'ⱉ', + 'Ⱊ' => 'ⱊ', + 'Ⱋ' => 'ⱋ', + 'Ⱌ' => 'ⱌ', + 'Ⱍ' => 'ⱍ', + 'Ⱎ' => 'ⱎ', + 'Ⱏ' => 'ⱏ', + 'Ⱐ' => 'ⱐ', + 'Ⱑ' => 'ⱑ', + 'Ⱒ' => 'ⱒ', + 'Ⱓ' => 'ⱓ', + 'Ⱔ' => 'ⱔ', + 'Ⱕ' => 'ⱕ', + 'Ⱖ' => 'ⱖ', + 'Ⱗ' => 'ⱗ', + 'Ⱘ' => 'ⱘ', + 'Ⱙ' => 'ⱙ', + 'Ⱚ' => 'ⱚ', + 'Ⱛ' => 'ⱛ', + 'Ⱜ' => 'ⱜ', + 'Ⱝ' => 'ⱝ', + 'Ⱞ' => 'ⱞ', + 'Ⱡ' => 'ⱡ', + 'Ɫ' => 'ɫ', + 'Ᵽ' => 'ᵽ', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'Ɑ' => 'ɑ', + 'Ɱ' => 'ɱ', + 'Ɐ' => 'ɐ', + 'Ɒ' => 'ɒ', + 'Ⱳ' => 'ⱳ', + 'Ⱶ' => 'ⱶ', + 'Ȿ' => 'ȿ', + 'Ɀ' => 'ɀ', + 'Ⲁ' => 'ⲁ', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'ⲅ', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'ⲍ', + 'Ⲏ' => 'ⲏ', + 'Ⲑ' => 'ⲑ', + 'Ⲓ' => 'ⲓ', + 'Ⲕ' => 'ⲕ', + 'Ⲗ' => 'ⲗ', + 'Ⲙ' => 'ⲙ', + 'Ⲛ' => 'ⲛ', + 'Ⲝ' => 'ⲝ', + 'Ⲟ' => 'ⲟ', + 'Ⲡ' => 'ⲡ', + 'Ⲣ' => 'ⲣ', + 'Ⲥ' => 'ⲥ', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'ⲭ', + 'Ⲯ' => 'ⲯ', + 'Ⲱ' => 'ⲱ', + 'Ⲳ' => 'ⲳ', + 'Ⲵ' => 'ⲵ', + 'Ⲷ' => 'ⲷ', + 'Ⲹ' => 'ⲹ', + 'Ⲻ' => 'ⲻ', + 'Ⲽ' => 'ⲽ', + 'Ⲿ' => 'ⲿ', + 'Ⳁ' => 'ⳁ', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'ⳅ', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'ⳍ', + 'Ⳏ' => 'ⳏ', + 'Ⳑ' => 'ⳑ', + 'Ⳓ' => 'ⳓ', + 'Ⳕ' => 'ⳕ', + 'Ⳗ' => 'ⳗ', + 'Ⳙ' => 'ⳙ', + 'Ⳛ' => 'ⳛ', + 'Ⳝ' => 'ⳝ', + 'Ⳟ' => 'ⳟ', + 'Ⳡ' => 'ⳡ', + 'Ⳣ' => 'ⳣ', + 'Ⳬ' => 'ⳬ', + 'Ⳮ' => 'ⳮ', + 'Ⳳ' => 'ⳳ', + 'Ꙁ' => 'ꙁ', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ꙅ', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ꙍ', + 'Ꙏ' => 'ꙏ', + 'Ꙑ' => 'ꙑ', + 'Ꙓ' => 'ꙓ', + 'Ꙕ' => 'ꙕ', + 'Ꙗ' => 'ꙗ', + 'Ꙙ' => 'ꙙ', + 'Ꙛ' => 'ꙛ', + 'Ꙝ' => 'ꙝ', + 'Ꙟ' => 'ꙟ', + 'Ꙡ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ꙭ', + 'Ꚁ' => 'ꚁ', + 'Ꚃ' => 'ꚃ', + 'Ꚅ' => 'ꚅ', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'ꚋ', + 'Ꚍ' => 'ꚍ', + 'Ꚏ' => 'ꚏ', + 'Ꚑ' => 'ꚑ', + 'Ꚓ' => 'ꚓ', + 'Ꚕ' => 'ꚕ', + 'Ꚗ' => 'ꚗ', + 'Ꚙ' => 'ꚙ', + 'Ꚛ' => 'ꚛ', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'Ꝁ' => 'ꝁ', + 'Ꝃ' => 'ꝃ', + 'Ꝅ' => 'ꝅ', + 'Ꝇ' => 'ꝇ', + 'Ꝉ' => 'ꝉ', + 'Ꝋ' => 'ꝋ', + 'Ꝍ' => 'ꝍ', + 'Ꝏ' => 'ꝏ', + 'Ꝑ' => 'ꝑ', + 'Ꝓ' => 'ꝓ', + 'Ꝕ' => 'ꝕ', + 'Ꝗ' => 'ꝗ', + 'Ꝙ' => 'ꝙ', + 'Ꝛ' => 'ꝛ', + 'Ꝝ' => 'ꝝ', + 'Ꝟ' => 'ꝟ', + 'Ꝡ' => 'ꝡ', + 'Ꝣ' => 'ꝣ', + 'Ꝥ' => 'ꝥ', + 'Ꝧ' => 'ꝧ', + 'Ꝩ' => 'ꝩ', + 'Ꝫ' => 'ꝫ', + 'Ꝭ' => 'ꝭ', + 'Ꝯ' => 'ꝯ', + 'Ꝺ' => 'ꝺ', + 'Ꝼ' => 'ꝼ', + 'Ᵹ' => 'ᵹ', + 'Ꝿ' => 'ꝿ', + 'Ꞁ' => 'ꞁ', + 'Ꞃ' => 'ꞃ', + 'Ꞅ' => 'ꞅ', + 'Ꞇ' => 'ꞇ', + 'Ꞌ' => 'ꞌ', + 'Ɥ' => 'ɥ', + 'Ꞑ' => 'ꞑ', + 'Ꞓ' => 'ꞓ', + 'Ꞗ' => 'ꞗ', + 'Ꞙ' => 'ꞙ', + 'Ꞛ' => 'ꞛ', + 'Ꞝ' => 'ꞝ', + 'Ꞟ' => 'ꞟ', + 'Ꞡ' => 'ꞡ', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'ꞩ', + 'Ɦ' => 'ɦ', + 'Ɜ' => 'ɜ', + 'Ɡ' => 'ɡ', + 'Ɬ' => 'ɬ', + 'Ʞ' => 'ʞ', + 'Ʇ' => 'ʇ', + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '𐐀' => '𐐨', + '𐐁' => '𐐩', + '𐐂' => '𐐪', + '𐐃' => '𐐫', + '𐐄' => '𐐬', + '𐐅' => '𐐭', + '𐐆' => '𐐮', + '𐐇' => '𐐯', + '𐐈' => '𐐰', + '𐐉' => '𐐱', + '𐐊' => '𐐲', + '𐐋' => '𐐳', + '𐐌' => '𐐴', + '𐐍' => '𐐵', + '𐐎' => '𐐶', + '𐐏' => '𐐷', + '𐐐' => '𐐸', + '𐐑' => '𐐹', + '𐐒' => '𐐺', + '𐐓' => '𐐻', + '𐐔' => '𐐼', + '𐐕' => '𐐽', + '𐐖' => '𐐾', + '𐐗' => '𐐿', + '𐐘' => '𐑀', + '𐐙' => '𐑁', + '𐐚' => '𐑂', + '𐐛' => '𐑃', + '𐐜' => '𐑄', + '𐐝' => '𐑅', + '𐐞' => '𐑆', + '𐐟' => '𐑇', + '𐐠' => '𐑈', + '𐐡' => '𐑉', + '𐐢' => '𐑊', + '𐐣' => '𐑋', + '𐐤' => '𐑌', + '𐐥' => '𐑍', + '𐐦' => '𐑎', + '𐐧' => '𐑏', + '𑢠' => '𑣀', + '𑢡' => '𑣁', + '𑢢' => '𑣂', + '𑢣' => '𑣃', + '𑢤' => '𑣄', + '𑢥' => '𑣅', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + '𑢭' => '𑣍', + '𑢮' => '𑣎', + '𑢯' => '𑣏', + '𑢰' => '𑣐', + '𑢱' => '𑣑', + '𑢲' => '𑣒', + '𑢳' => '𑣓', + '𑢴' => '𑣔', + '𑢵' => '𑣕', + '𑢶' => '𑣖', + '𑢷' => '𑣗', + '𑢸' => '𑣘', + '𑢹' => '𑣙', + '𑢺' => '𑣚', + '𑢻' => '𑣛', + '𑢼' => '𑣜', + '𑢽' => '𑣝', + '𑢾' => '𑣞', + '𑢿' => '𑣟', +); diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 0000000..2a8f6e7 --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ +<?php + +// from Case_Ignorable in https://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt + +return '/(?<![\x{0027}\x{002E}\x{003A}\x{005E}\x{0060}\x{00A8}\x{00AD}\x{00AF}\x{00B4}\x{00B7}\x{00B8}\x{02B0}-\x{02C1}\x{02C2}-\x{02C5}\x{02C6}-\x{02D1}\x{02D2}-\x{02DF}\x{02E0}-\x{02E4}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EE}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037A}\x{0384}-\x{0385}\x{0387}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0559}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{05F4}\x{0600}-\x{0605}\x{0610}-\x{061A}\x{061C}\x{0640}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DD}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07FA}\x{07FD}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0971}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E46}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EB9}\x{0EBB}-\x{0EBC}\x{0EC6}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{10FC}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17D7}\x{17DD}\x{180B}-\x{180D}\x{180E}\x{1843}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AA7}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1C78}-\x{1C7D}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1D2C}-\x{1D6A}\x{1D78}\x{1D9B}-\x{1DBF}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200F}\x{2018}\x{2019}\x{2024}\x{2027}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{2066}-\x{206F}\x{2071}\x{207F}\x{2090}-\x{209C}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2C7C}-\x{2C7D}\x{2CEF}-\x{2CF1}\x{2D6F}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E2F}\x{3005}\x{302A}-\x{302D}\x{3031}-\x{3035}\x{303B}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{309D}-\x{309E}\x{30FC}-\x{30FE}\x{A015}\x{A4F8}-\x{A4FD}\x{A60C}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A67F}\x{A69C}-\x{A69D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A770}\x{A788}\x{A789}-\x{A78A}\x{A7F8}-\x{A7F9}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}\x{A9CF}\x{A9E5}\x{A9E6}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA70}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AADD}\x{AAEC}-\x{AAED}\x{AAF3}-\x{AAF4}\x{AAF6}\x{AB5B}\x{AB5C}-\x{AB5F}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FBB2}-\x{FBC1}\x{FE00}-\x{FE0F}\x{FE13}\x{FE20}-\x{FE2F}\x{FE52}\x{FE55}\x{FEFF}\x{FF07}\x{FF0E}\x{FF1A}\x{FF3E}\x{FF40}\x{FF70}\x{FF9E}-\x{FF9F}\x{FFE3}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{110BD}\x{110CD}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16B40}-\x{16B43}\x{16F8F}-\x{16F92}\x{16F93}-\x{16F9F}\x{16FE0}-\x{16FE1}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1F3FB}-\x{1F3FF}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}])(\pL)(\pL*+)/u'; diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php new file mode 100644 index 0000000..b8103b2 --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php @@ -0,0 +1,1104 @@ +<?php + +return array( + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Á', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'å' => 'Å', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'Ì', + 'í' => 'Í', + 'î' => 'Î', + 'ï' => 'Ï', + 'ð' => 'Ð', + 'ñ' => 'Ñ', + 'ò' => 'Ò', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ý', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'ā' => 'Ā', + 'ă' => 'Ă', + 'ą' => 'Ą', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'ċ' => 'Ċ', + 'č' => 'Č', + 'ď' => 'Ď', + 'đ' => 'Đ', + 'ē' => 'Ē', + 'ĕ' => 'Ĕ', + 'ė' => 'Ė', + 'ę' => 'Ę', + 'ě' => 'Ě', + 'ĝ' => 'Ĝ', + 'ğ' => 'Ğ', + 'ġ' => 'Ġ', + 'ģ' => 'Ģ', + 'ĥ' => 'Ĥ', + 'ħ' => 'Ħ', + 'ĩ' => 'Ĩ', + 'ī' => 'Ī', + 'ĭ' => 'Ĭ', + 'į' => 'Į', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ĵ', + 'ķ' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ļ', + 'ľ' => 'Ľ', + 'ŀ' => 'Ŀ', + 'ł' => 'Ł', + 'ń' => 'Ń', + 'ņ' => 'Ņ', + 'ň' => 'Ň', + 'ŋ' => 'Ŋ', + 'ō' => 'Ō', + 'ŏ' => 'Ŏ', + 'ő' => 'Ő', + 'œ' => 'Œ', + 'ŕ' => 'Ŕ', + 'ŗ' => 'Ŗ', + 'ř' => 'Ř', + 'ś' => 'Ś', + 'ŝ' => 'Ŝ', + 'ş' => 'Ş', + 'š' => 'Š', + 'ţ' => 'Ţ', + 'ť' => 'Ť', + 'ŧ' => 'Ŧ', + 'ũ' => 'Ũ', + 'ū' => 'Ū', + 'ŭ' => 'Ŭ', + 'ů' => 'Ů', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Ŵ', + 'ŷ' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Ż', + 'ž' => 'Ž', + 'ſ' => 'S', + 'ƀ' => 'Ƀ', + 'ƃ' => 'Ƃ', + 'ƅ' => 'Ƅ', + 'ƈ' => 'Ƈ', + 'ƌ' => 'Ƌ', + 'ƒ' => 'Ƒ', + 'ƕ' => 'Ƕ', + 'ƙ' => 'Ƙ', + 'ƚ' => 'Ƚ', + 'ƞ' => 'Ƞ', + 'ơ' => 'Ơ', + 'ƣ' => 'Ƣ', + 'ƥ' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'ƭ' => 'Ƭ', + 'ư' => 'Ư', + 'ƴ' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'ƿ' => 'Ƿ', + 'Dž' => 'DŽ', + 'dž' => 'DŽ', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Nj' => 'NJ', + 'nj' => 'NJ', + 'ǎ' => 'Ǎ', + 'ǐ' => 'Ǐ', + 'ǒ' => 'Ǒ', + 'ǔ' => 'Ǔ', + 'ǖ' => 'Ǖ', + 'ǘ' => 'Ǘ', + 'ǚ' => 'Ǚ', + 'ǜ' => 'Ǜ', + 'ǝ' => 'Ǝ', + 'ǟ' => 'Ǟ', + 'ǡ' => 'Ǡ', + 'ǣ' => 'Ǣ', + 'ǥ' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'ǩ' => 'Ǩ', + 'ǫ' => 'Ǫ', + 'ǭ' => 'Ǭ', + 'ǯ' => 'Ǯ', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ǵ', + 'ǹ' => 'Ǹ', + 'ǻ' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'ǿ' => 'Ǿ', + 'ȁ' => 'Ȁ', + 'ȃ' => 'Ȃ', + 'ȅ' => 'Ȅ', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'ȋ' => 'Ȋ', + 'ȍ' => 'Ȍ', + 'ȏ' => 'Ȏ', + 'ȑ' => 'Ȑ', + 'ȓ' => 'Ȓ', + 'ȕ' => 'Ȕ', + 'ȗ' => 'Ȗ', + 'ș' => 'Ș', + 'ț' => 'Ț', + 'ȝ' => 'Ȝ', + 'ȟ' => 'Ȟ', + 'ȣ' => 'Ȣ', + 'ȥ' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'ȩ' => 'Ȩ', + 'ȫ' => 'Ȫ', + 'ȭ' => 'Ȭ', + 'ȯ' => 'Ȯ', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'Ȼ', + 'ȿ' => 'Ȿ', + 'ɀ' => 'Ɀ', + 'ɂ' => 'Ɂ', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'ɋ' => 'Ɋ', + 'ɍ' => 'Ɍ', + 'ɏ' => 'Ɏ', + 'ɐ' => 'Ɐ', + 'ɑ' => 'Ɑ', + 'ɒ' => 'Ɒ', + 'ɓ' => 'Ɓ', + 'ɔ' => 'Ɔ', + 'ɖ' => 'Ɖ', + 'ɗ' => 'Ɗ', + 'ə' => 'Ə', + 'ɛ' => 'Ɛ', + 'ɜ' => 'Ɜ', + 'ɠ' => 'Ɠ', + 'ɡ' => 'Ɡ', + 'ɣ' => 'Ɣ', + 'ɥ' => 'Ɥ', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Ɨ', + 'ɩ' => 'Ɩ', + 'ɫ' => 'Ɫ', + 'ɬ' => 'Ɬ', + 'ɯ' => 'Ɯ', + 'ɱ' => 'Ɱ', + 'ɲ' => 'Ɲ', + 'ɵ' => 'Ɵ', + 'ɽ' => 'Ɽ', + 'ʀ' => 'Ʀ', + 'ʃ' => 'Ʃ', + 'ʇ' => 'Ʇ', + 'ʈ' => 'Ʈ', + 'ʉ' => 'Ʉ', + 'ʊ' => 'Ʊ', + 'ʋ' => 'Ʋ', + 'ʌ' => 'Ʌ', + 'ʒ' => 'Ʒ', + 'ʞ' => 'Ʞ', + 'ͅ' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'ͷ' => 'Ͷ', + 'ͻ' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ͽ', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Β', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Ν', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'π' => 'Π', + 'ρ' => 'Ρ', + 'ς' => 'Σ', + 'σ' => 'Σ', + 'τ' => 'Τ', + 'υ' => 'Υ', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ϊ' => 'Ϊ', + 'ϋ' => 'Ϋ', + 'ό' => 'Ό', + 'ύ' => 'Ύ', + 'ώ' => 'Ώ', + 'ϐ' => 'Β', + 'ϑ' => 'Θ', + 'ϕ' => 'Φ', + 'ϖ' => 'Π', + 'ϗ' => 'Ϗ', + 'ϙ' => 'Ϙ', + 'ϛ' => 'Ϛ', + 'ϝ' => 'Ϝ', + 'ϟ' => 'Ϟ', + 'ϡ' => 'Ϡ', + 'ϣ' => 'Ϣ', + 'ϥ' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'ϩ' => 'Ϩ', + 'ϫ' => 'Ϫ', + 'ϭ' => 'Ϭ', + 'ϯ' => 'Ϯ', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Ϳ', + 'ϵ' => 'Ε', + 'ϸ' => 'Ϸ', + 'ϻ' => 'Ϻ', + 'а' => 'А', + 'б' => 'Б', + 'в' => 'В', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Н', + 'о' => 'О', + 'п' => 'П', + 'р' => 'Р', + 'с' => 'С', + 'т' => 'Т', + 'у' => 'У', + 'ф' => 'Ф', + 'х' => 'Х', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ъ' => 'Ъ', + 'ы' => 'Ы', + 'ь' => 'Ь', + 'э' => 'Э', + 'ю' => 'Ю', + 'я' => 'Я', + 'ѐ' => 'Ѐ', + 'ё' => 'Ё', + 'ђ' => 'Ђ', + 'ѓ' => 'Ѓ', + 'є' => 'Є', + 'ѕ' => 'Ѕ', + 'і' => 'І', + 'ї' => 'Ї', + 'ј' => 'Ј', + 'љ' => 'Љ', + 'њ' => 'Њ', + 'ћ' => 'Ћ', + 'ќ' => 'Ќ', + 'ѝ' => 'Ѝ', + 'ў' => 'Ў', + 'џ' => 'Џ', + 'ѡ' => 'Ѡ', + 'ѣ' => 'Ѣ', + 'ѥ' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'ѩ' => 'Ѩ', + 'ѫ' => 'Ѫ', + 'ѭ' => 'Ѭ', + 'ѯ' => 'Ѯ', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ѵ', + 'ѷ' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'ѻ' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'ѿ' => 'Ѿ', + 'ҁ' => 'Ҁ', + 'ҋ' => 'Ҋ', + 'ҍ' => 'Ҍ', + 'ҏ' => 'Ҏ', + 'ґ' => 'Ґ', + 'ғ' => 'Ғ', + 'ҕ' => 'Ҕ', + 'җ' => 'Җ', + 'ҙ' => 'Ҙ', + 'қ' => 'Қ', + 'ҝ' => 'Ҝ', + 'ҟ' => 'Ҟ', + 'ҡ' => 'Ҡ', + 'ң' => 'Ң', + 'ҥ' => 'Ҥ', + 'ҧ' => 'Ҧ', + 'ҩ' => 'Ҩ', + 'ҫ' => 'Ҫ', + 'ҭ' => 'Ҭ', + 'ү' => 'Ү', + 'ұ' => 'Ұ', + 'ҳ' => 'Ҳ', + 'ҵ' => 'Ҵ', + 'ҷ' => 'Ҷ', + 'ҹ' => 'Ҹ', + 'һ' => 'Һ', + 'ҽ' => 'Ҽ', + 'ҿ' => 'Ҿ', + 'ӂ' => 'Ӂ', + 'ӄ' => 'Ӄ', + 'ӆ' => 'Ӆ', + 'ӈ' => 'Ӈ', + 'ӊ' => 'Ӊ', + 'ӌ' => 'Ӌ', + 'ӎ' => 'Ӎ', + 'ӏ' => 'Ӏ', + 'ӑ' => 'Ӑ', + 'ӓ' => 'Ӓ', + 'ӕ' => 'Ӕ', + 'ӗ' => 'Ӗ', + 'ә' => 'Ә', + 'ӛ' => 'Ӛ', + 'ӝ' => 'Ӝ', + 'ӟ' => 'Ӟ', + 'ӡ' => 'Ӡ', + 'ӣ' => 'Ӣ', + 'ӥ' => 'Ӥ', + 'ӧ' => 'Ӧ', + 'ө' => 'Ө', + 'ӫ' => 'Ӫ', + 'ӭ' => 'Ӭ', + 'ӯ' => 'Ӯ', + 'ӱ' => 'Ӱ', + 'ӳ' => 'Ӳ', + 'ӵ' => 'Ӵ', + 'ӷ' => 'Ӷ', + 'ӹ' => 'Ӹ', + 'ӻ' => 'Ӻ', + 'ӽ' => 'Ӽ', + 'ӿ' => 'Ӿ', + 'ԁ' => 'Ԁ', + 'ԃ' => 'Ԃ', + 'ԅ' => 'Ԅ', + 'ԇ' => 'Ԇ', + 'ԉ' => 'Ԉ', + 'ԋ' => 'Ԋ', + 'ԍ' => 'Ԍ', + 'ԏ' => 'Ԏ', + 'ԑ' => 'Ԑ', + 'ԓ' => 'Ԓ', + 'ԕ' => 'Ԕ', + 'ԗ' => 'Ԗ', + 'ԙ' => 'Ԙ', + 'ԛ' => 'Ԛ', + 'ԝ' => 'Ԝ', + 'ԟ' => 'Ԟ', + 'ԡ' => 'Ԡ', + 'ԣ' => 'Ԣ', + 'ԥ' => 'Ԥ', + 'ԧ' => 'Ԧ', + 'ԩ' => 'Ԩ', + 'ԫ' => 'Ԫ', + 'ԭ' => 'Ԭ', + 'ԯ' => 'Ԯ', + 'ա' => 'Ա', + 'բ' => 'Բ', + 'գ' => 'Գ', + 'դ' => 'Դ', + 'ե' => 'Ե', + 'զ' => 'Զ', + 'է' => 'Է', + 'ը' => 'Ը', + 'թ' => 'Թ', + 'ժ' => 'Ժ', + 'ի' => 'Ի', + 'լ' => 'Լ', + 'խ' => 'Խ', + 'ծ' => 'Ծ', + 'կ' => 'Կ', + 'հ' => 'Հ', + 'ձ' => 'Ձ', + 'ղ' => 'Ղ', + 'ճ' => 'Ճ', + 'մ' => 'Մ', + 'յ' => 'Յ', + 'ն' => 'Ն', + 'շ' => 'Շ', + 'ո' => 'Ո', + 'չ' => 'Չ', + 'պ' => 'Պ', + 'ջ' => 'Ջ', + 'ռ' => 'Ռ', + 'ս' => 'Ս', + 'վ' => 'Վ', + 'տ' => 'Տ', + 'ր' => 'Ր', + 'ց' => 'Ց', + 'ւ' => 'Ւ', + 'փ' => 'Փ', + 'ք' => 'Ք', + 'օ' => 'Օ', + 'ֆ' => 'Ֆ', + 'ᵹ' => 'Ᵹ', + 'ᵽ' => 'Ᵽ', + 'ḁ' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'ḍ' => 'Ḍ', + 'ḏ' => 'Ḏ', + 'ḑ' => 'Ḑ', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'ḝ' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'ṁ' => 'Ṁ', + 'ṃ' => 'Ṃ', + 'ṅ' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'ṍ' => 'Ṍ', + 'ṏ' => 'Ṏ', + 'ṑ' => 'Ṑ', + 'ṓ' => 'Ṓ', + 'ṕ' => 'Ṕ', + 'ṗ' => 'Ṗ', + 'ṙ' => 'Ṙ', + 'ṛ' => 'Ṛ', + 'ṝ' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'Ṡ', + 'ṣ' => 'Ṣ', + 'ṥ' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'ṭ' => 'Ṭ', + 'ṯ' => 'Ṯ', + 'ṱ' => 'Ṱ', + 'ṳ' => 'Ṳ', + 'ṵ' => 'Ṵ', + 'ṷ' => 'Ṷ', + 'ṹ' => 'Ṹ', + 'ṻ' => 'Ṻ', + 'ṽ' => 'Ṽ', + 'ṿ' => 'Ṿ', + 'ẁ' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'ẍ' => 'Ẍ', + 'ẏ' => 'Ẏ', + 'ẑ' => 'Ẑ', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'Ṡ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'ề' => 'Ề', + 'ể' => 'Ể', + 'ễ' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'ọ' => 'Ọ', + 'ỏ' => 'Ỏ', + 'ố' => 'Ố', + 'ồ' => 'Ồ', + 'ổ' => 'Ổ', + 'ỗ' => 'Ỗ', + 'ộ' => 'Ộ', + 'ớ' => 'Ớ', + 'ờ' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'Ỡ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'ử' => 'Ử', + 'ữ' => 'Ữ', + 'ự' => 'Ự', + 'ỳ' => 'Ỳ', + 'ỵ' => 'Ỵ', + 'ỷ' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'ỻ' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'ἀ' => 'Ἀ', + 'ἁ' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'ἅ' => 'Ἅ', + 'ἆ' => 'Ἆ', + 'ἇ' => 'Ἇ', + 'ἐ' => 'Ἐ', + 'ἑ' => 'Ἑ', + 'ἒ' => 'Ἒ', + 'ἓ' => 'Ἓ', + 'ἔ' => 'Ἔ', + 'ἕ' => 'Ἕ', + 'ἠ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'ἢ' => 'Ἢ', + 'ἣ' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'ἥ' => 'Ἥ', + 'ἦ' => 'Ἦ', + 'ἧ' => 'Ἧ', + 'ἰ' => 'Ἰ', + 'ἱ' => 'Ἱ', + 'ἲ' => 'Ἲ', + 'ἳ' => 'Ἳ', + 'ἴ' => 'Ἴ', + 'ἵ' => 'Ἵ', + 'ἶ' => 'Ἶ', + 'ἷ' => 'Ἷ', + 'ὀ' => 'Ὀ', + 'ὁ' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'ὅ' => 'Ὅ', + 'ὑ' => 'Ὑ', + 'ὓ' => 'Ὓ', + 'ὕ' => 'Ὕ', + 'ὗ' => 'Ὗ', + 'ὠ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'ὢ' => 'Ὢ', + 'ὣ' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'ὥ' => 'Ὥ', + 'ὦ' => 'Ὦ', + 'ὧ' => 'Ὧ', + 'ὰ' => 'Ὰ', + 'ά' => 'Ά', + 'ὲ' => 'Ὲ', + 'έ' => 'Έ', + 'ὴ' => 'Ὴ', + 'ή' => 'Ή', + 'ὶ' => 'Ὶ', + 'ί' => 'Ί', + 'ὸ' => 'Ὸ', + 'ό' => 'Ό', + 'ὺ' => 'Ὺ', + 'ύ' => 'Ύ', + 'ὼ' => 'Ὼ', + 'ώ' => 'Ώ', + 'ᾀ' => 'ᾈ', + 'ᾁ' => 'ᾉ', + 'ᾂ' => 'ᾊ', + 'ᾃ' => 'ᾋ', + 'ᾄ' => 'ᾌ', + 'ᾅ' => 'ᾍ', + 'ᾆ' => 'ᾎ', + 'ᾇ' => 'ᾏ', + 'ᾐ' => 'ᾘ', + 'ᾑ' => 'ᾙ', + 'ᾒ' => 'ᾚ', + 'ᾓ' => 'ᾛ', + 'ᾔ' => 'ᾜ', + 'ᾕ' => 'ᾝ', + 'ᾖ' => 'ᾞ', + 'ᾗ' => 'ᾟ', + 'ᾠ' => 'ᾨ', + 'ᾡ' => 'ᾩ', + 'ᾢ' => 'ᾪ', + 'ᾣ' => 'ᾫ', + 'ᾤ' => 'ᾬ', + 'ᾥ' => 'ᾭ', + 'ᾦ' => 'ᾮ', + 'ᾧ' => 'ᾯ', + 'ᾰ' => 'Ᾰ', + 'ᾱ' => 'Ᾱ', + 'ᾳ' => 'ᾼ', + 'ι' => 'Ι', + 'ῃ' => 'ῌ', + 'ῐ' => 'Ῐ', + 'ῑ' => 'Ῑ', + 'ῠ' => 'Ῠ', + 'ῡ' => 'Ῡ', + 'ῥ' => 'Ῥ', + 'ῳ' => 'ῼ', + 'ⅎ' => 'Ⅎ', + 'ⅰ' => 'Ⅰ', + 'ⅱ' => 'Ⅱ', + 'ⅲ' => 'Ⅲ', + 'ⅳ' => 'Ⅳ', + 'ⅴ' => 'Ⅴ', + 'ⅵ' => 'Ⅵ', + 'ⅶ' => 'Ⅶ', + 'ⅷ' => 'Ⅷ', + 'ⅸ' => 'Ⅸ', + 'ⅹ' => 'Ⅹ', + 'ⅺ' => 'Ⅺ', + 'ⅻ' => 'Ⅻ', + 'ⅼ' => 'Ⅼ', + 'ⅽ' => 'Ⅽ', + 'ⅾ' => 'Ⅾ', + 'ⅿ' => 'Ⅿ', + 'ↄ' => 'Ↄ', + 'ⓐ' => 'Ⓐ', + 'ⓑ' => 'Ⓑ', + 'ⓒ' => 'Ⓒ', + 'ⓓ' => 'Ⓓ', + 'ⓔ' => 'Ⓔ', + 'ⓕ' => 'Ⓕ', + 'ⓖ' => 'Ⓖ', + 'ⓗ' => 'Ⓗ', + 'ⓘ' => 'Ⓘ', + 'ⓙ' => 'Ⓙ', + 'ⓚ' => 'Ⓚ', + 'ⓛ' => 'Ⓛ', + 'ⓜ' => 'Ⓜ', + 'ⓝ' => 'Ⓝ', + 'ⓞ' => 'Ⓞ', + 'ⓟ' => 'Ⓟ', + 'ⓠ' => 'Ⓠ', + 'ⓡ' => 'Ⓡ', + 'ⓢ' => 'Ⓢ', + 'ⓣ' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'ⓥ' => 'Ⓥ', + 'ⓦ' => 'Ⓦ', + 'ⓧ' => 'Ⓧ', + 'ⓨ' => 'Ⓨ', + 'ⓩ' => 'Ⓩ', + 'ⰰ' => 'Ⰰ', + 'ⰱ' => 'Ⰱ', + 'ⰲ' => 'Ⰲ', + 'ⰳ' => 'Ⰳ', + 'ⰴ' => 'Ⰴ', + 'ⰵ' => 'Ⰵ', + 'ⰶ' => 'Ⰶ', + 'ⰷ' => 'Ⰷ', + 'ⰸ' => 'Ⰸ', + 'ⰹ' => 'Ⰹ', + 'ⰺ' => 'Ⰺ', + 'ⰻ' => 'Ⰻ', + 'ⰼ' => 'Ⰼ', + 'ⰽ' => 'Ⰽ', + 'ⰾ' => 'Ⰾ', + 'ⰿ' => 'Ⰿ', + 'ⱀ' => 'Ⱀ', + 'ⱁ' => 'Ⱁ', + 'ⱂ' => 'Ⱂ', + 'ⱃ' => 'Ⱃ', + 'ⱄ' => 'Ⱄ', + 'ⱅ' => 'Ⱅ', + 'ⱆ' => 'Ⱆ', + 'ⱇ' => 'Ⱇ', + 'ⱈ' => 'Ⱈ', + 'ⱉ' => 'Ⱉ', + 'ⱊ' => 'Ⱊ', + 'ⱋ' => 'Ⱋ', + 'ⱌ' => 'Ⱌ', + 'ⱍ' => 'Ⱍ', + 'ⱎ' => 'Ⱎ', + 'ⱏ' => 'Ⱏ', + 'ⱐ' => 'Ⱐ', + 'ⱑ' => 'Ⱑ', + 'ⱒ' => 'Ⱒ', + 'ⱓ' => 'Ⱓ', + 'ⱔ' => 'Ⱔ', + 'ⱕ' => 'Ⱕ', + 'ⱖ' => 'Ⱖ', + 'ⱗ' => 'Ⱗ', + 'ⱘ' => 'Ⱘ', + 'ⱙ' => 'Ⱙ', + 'ⱚ' => 'Ⱚ', + 'ⱛ' => 'Ⱛ', + 'ⱜ' => 'Ⱜ', + 'ⱝ' => 'Ⱝ', + 'ⱞ' => 'Ⱞ', + 'ⱡ' => 'Ⱡ', + 'ⱥ' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'ⱳ' => 'Ⱳ', + 'ⱶ' => 'Ⱶ', + 'ⲁ' => 'Ⲁ', + 'ⲃ' => 'Ⲃ', + 'ⲅ' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'ⲍ' => 'Ⲍ', + 'ⲏ' => 'Ⲏ', + 'ⲑ' => 'Ⲑ', + 'ⲓ' => 'Ⲓ', + 'ⲕ' => 'Ⲕ', + 'ⲗ' => 'Ⲗ', + 'ⲙ' => 'Ⲙ', + 'ⲛ' => 'Ⲛ', + 'ⲝ' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'Ⲡ', + 'ⲣ' => 'Ⲣ', + 'ⲥ' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'ⲭ' => 'Ⲭ', + 'ⲯ' => 'Ⲯ', + 'ⲱ' => 'Ⲱ', + 'ⲳ' => 'Ⲳ', + 'ⲵ' => 'Ⲵ', + 'ⲷ' => 'Ⲷ', + 'ⲹ' => 'Ⲹ', + 'ⲻ' => 'Ⲻ', + 'ⲽ' => 'Ⲽ', + 'ⲿ' => 'Ⲿ', + 'ⳁ' => 'Ⳁ', + 'ⳃ' => 'Ⳃ', + 'ⳅ' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'ⳍ' => 'Ⳍ', + 'ⳏ' => 'Ⳏ', + 'ⳑ' => 'Ⳑ', + 'ⳓ' => 'Ⳓ', + 'ⳕ' => 'Ⳕ', + 'ⳗ' => 'Ⳗ', + 'ⳙ' => 'Ⳙ', + 'ⳛ' => 'Ⳛ', + 'ⳝ' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'Ⳡ', + 'ⳣ' => 'Ⳣ', + 'ⳬ' => 'Ⳬ', + 'ⳮ' => 'Ⳮ', + 'ⳳ' => 'Ⳳ', + 'ⴀ' => 'Ⴀ', + 'ⴁ' => 'Ⴁ', + 'ⴂ' => 'Ⴂ', + 'ⴃ' => 'Ⴃ', + 'ⴄ' => 'Ⴄ', + 'ⴅ' => 'Ⴅ', + 'ⴆ' => 'Ⴆ', + 'ⴇ' => 'Ⴇ', + 'ⴈ' => 'Ⴈ', + 'ⴉ' => 'Ⴉ', + 'ⴊ' => 'Ⴊ', + 'ⴋ' => 'Ⴋ', + 'ⴌ' => 'Ⴌ', + 'ⴍ' => 'Ⴍ', + 'ⴎ' => 'Ⴎ', + 'ⴏ' => 'Ⴏ', + 'ⴐ' => 'Ⴐ', + 'ⴑ' => 'Ⴑ', + 'ⴒ' => 'Ⴒ', + 'ⴓ' => 'Ⴓ', + 'ⴔ' => 'Ⴔ', + 'ⴕ' => 'Ⴕ', + 'ⴖ' => 'Ⴖ', + 'ⴗ' => 'Ⴗ', + 'ⴘ' => 'Ⴘ', + 'ⴙ' => 'Ⴙ', + 'ⴚ' => 'Ⴚ', + 'ⴛ' => 'Ⴛ', + 'ⴜ' => 'Ⴜ', + 'ⴝ' => 'Ⴝ', + 'ⴞ' => 'Ⴞ', + 'ⴟ' => 'Ⴟ', + 'ⴠ' => 'Ⴠ', + 'ⴡ' => 'Ⴡ', + 'ⴢ' => 'Ⴢ', + 'ⴣ' => 'Ⴣ', + 'ⴤ' => 'Ⴤ', + 'ⴥ' => 'Ⴥ', + 'ⴧ' => 'Ⴧ', + 'ⴭ' => 'Ⴭ', + 'ꙁ' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ꙅ' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ꙍ' => 'Ꙍ', + 'ꙏ' => 'Ꙏ', + 'ꙑ' => 'Ꙑ', + 'ꙓ' => 'Ꙓ', + 'ꙕ' => 'Ꙕ', + 'ꙗ' => 'Ꙗ', + 'ꙙ' => 'Ꙙ', + 'ꙛ' => 'Ꙛ', + 'ꙝ' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'Ꙡ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ꙭ' => 'Ꙭ', + 'ꚁ' => 'Ꚁ', + 'ꚃ' => 'Ꚃ', + 'ꚅ' => 'Ꚅ', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'ꚋ' => 'Ꚋ', + 'ꚍ' => 'Ꚍ', + 'ꚏ' => 'Ꚏ', + 'ꚑ' => 'Ꚑ', + 'ꚓ' => 'Ꚓ', + 'ꚕ' => 'Ꚕ', + 'ꚗ' => 'Ꚗ', + 'ꚙ' => 'Ꚙ', + 'ꚛ' => 'Ꚛ', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ꝁ' => 'Ꝁ', + 'ꝃ' => 'Ꝃ', + 'ꝅ' => 'Ꝅ', + 'ꝇ' => 'Ꝇ', + 'ꝉ' => 'Ꝉ', + 'ꝋ' => 'Ꝋ', + 'ꝍ' => 'Ꝍ', + 'ꝏ' => 'Ꝏ', + 'ꝑ' => 'Ꝑ', + 'ꝓ' => 'Ꝓ', + 'ꝕ' => 'Ꝕ', + 'ꝗ' => 'Ꝗ', + 'ꝙ' => 'Ꝙ', + 'ꝛ' => 'Ꝛ', + 'ꝝ' => 'Ꝝ', + 'ꝟ' => 'Ꝟ', + 'ꝡ' => 'Ꝡ', + 'ꝣ' => 'Ꝣ', + 'ꝥ' => 'Ꝥ', + 'ꝧ' => 'Ꝧ', + 'ꝩ' => 'Ꝩ', + 'ꝫ' => 'Ꝫ', + 'ꝭ' => 'Ꝭ', + 'ꝯ' => 'Ꝯ', + 'ꝺ' => 'Ꝺ', + 'ꝼ' => 'Ꝼ', + 'ꝿ' => 'Ꝿ', + 'ꞁ' => 'Ꞁ', + 'ꞃ' => 'Ꞃ', + 'ꞅ' => 'Ꞅ', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'Ꞌ', + 'ꞑ' => 'Ꞑ', + 'ꞓ' => 'Ꞓ', + 'ꞗ' => 'Ꞗ', + 'ꞙ' => 'Ꞙ', + 'ꞛ' => 'Ꞛ', + 'ꞝ' => 'Ꞝ', + 'ꞟ' => 'Ꞟ', + 'ꞡ' => 'Ꞡ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'ꞧ' => 'Ꞧ', + 'ꞩ' => 'Ꞩ', + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '𐐨' => '𐐀', + '𐐩' => '𐐁', + '𐐪' => '𐐂', + '𐐫' => '𐐃', + '𐐬' => '𐐄', + '𐐭' => '𐐅', + '𐐮' => '𐐆', + '𐐯' => '𐐇', + '𐐰' => '𐐈', + '𐐱' => '𐐉', + '𐐲' => '𐐊', + '𐐳' => '𐐋', + '𐐴' => '𐐌', + '𐐵' => '𐐍', + '𐐶' => '𐐎', + '𐐷' => '𐐏', + '𐐸' => '𐐐', + '𐐹' => '𐐑', + '𐐺' => '𐐒', + '𐐻' => '𐐓', + '𐐼' => '𐐔', + '𐐽' => '𐐕', + '𐐾' => '𐐖', + '𐐿' => '𐐗', + '𐑀' => '𐐘', + '𐑁' => '𐐙', + '𐑂' => '𐐚', + '𐑃' => '𐐛', + '𐑄' => '𐐜', + '𐑅' => '𐐝', + '𐑆' => '𐐞', + '𐑇' => '𐐟', + '𐑈' => '𐐠', + '𐑉' => '𐐡', + '𐑊' => '𐐢', + '𐑋' => '𐐣', + '𐑌' => '𐐤', + '𐑍' => '𐐥', + '𐑎' => '𐐦', + '𐑏' => '𐐧', + '𑣀' => '𑢠', + '𑣁' => '𑢡', + '𑣂' => '𑢢', + '𑣃' => '𑢣', + '𑣄' => '𑢤', + '𑣅' => '𑢥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + '𑣍' => '𑢭', + '𑣎' => '𑢮', + '𑣏' => '𑢯', + '𑣐' => '𑢰', + '𑣑' => '𑢱', + '𑣒' => '𑢲', + '𑣓' => '𑢳', + '𑣔' => '𑢴', + '𑣕' => '𑢵', + '𑣖' => '𑢶', + '𑣗' => '𑢷', + '𑣘' => '𑢸', + '𑣙' => '𑢹', + '𑣚' => '𑢺', + '𑣛' => '𑢻', + '𑣜' => '𑢼', + '𑣝' => '𑢽', + '𑣞' => '𑢾', + '𑣟' => '𑢿', +); diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/bootstrap.php b/public/system/storage/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 0000000..2fdcc5a --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,58 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_strlen')) { + define('MB_CASE_UPPER', 0); + define('MB_CASE_LOWER', 1); + define('MB_CASE_TITLE', 2); + + function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } + function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } + function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } + function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } + function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } + function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } + function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } + function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } + function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } + function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } + function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } + function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } + function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } + function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } + function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } + function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } + function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } + function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } + function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } + function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } + function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } + function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } + function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } + function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } + function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } + function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } + function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } + function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } + function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } + function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } + function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } +} +if (!function_exists('mb_chr')) { + function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); } + function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); } + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } +} diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/composer.json b/public/system/storage/vendor/symfony/polyfill-mbstring/composer.json new file mode 100644 index 0000000..0bce087 --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/.gitignore b/public/system/storage/vendor/symfony/translation/.gitignore new file mode 100644 index 0000000..c49a5d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/.gitignore @@ -0,0 +1,3 @@ +vendor/ +composer.lock +phpunit.xml diff --git a/public/system/storage/vendor/symfony/translation/CHANGELOG.md b/public/system/storage/vendor/symfony/translation/CHANGELOG.md new file mode 100644 index 0000000..b011f9e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/CHANGELOG.md @@ -0,0 +1,69 @@ +CHANGELOG +========= + +3.0.0 +----- + + * removed `FileDumper::format()` method. + * Changed the visibility of the locale property in `Translator` from protected to private. + +2.8.0 +----- + + * deprecated FileDumper::format(), overwrite FileDumper::formatCatalogue() instead. + * deprecated Translator::getMessages(), rely on TranslatorBagInterface::getCatalogue() instead. + * added `FileDumper::formatCatalogue` which allows format the catalogue without dumping it into file. + * added option `json_encoding` to JsonFileDumper + * added options `as_tree`, `inline` to YamlFileDumper + * added support for XLIFF 2.0. + * added support for XLIFF target and tool attributes. + * added message parameters to DataCollectorTranslator. + * [DEPRECATION] The `DiffOperation` class has been deprecated and + will be removed in Symfony 3.0, since its operation has nothing to do with 'diff', + so the class name is misleading. The `TargetOperation` class should be used for + this use-case instead. + +2.7.0 +----- + + * added DataCollectorTranslator for collecting the translated messages. + +2.6.0 +----- + + * added possibility to cache catalogues + * added TranslatorBagInterface + * added LoggingTranslator + * added Translator::getMessages() for retrieving the message catalogue as an array + +2.5.0 +----- + + * added relative file path template to the file dumpers + * added optional backup to the file dumpers + * changed IcuResFileDumper to extend FileDumper + +2.3.0 +----- + + * added classes to make operations on catalogues (like making a diff or a merge on 2 catalogues) + * added Translator::getFallbackLocales() + * deprecated Translator::setFallbackLocale() in favor of the new Translator::setFallbackLocales() method + +2.2.0 +----- + + * QtTranslationsLoader class renamed to QtFileLoader. QtTranslationsLoader is deprecated and will be removed in 2.3. + * [BC BREAK] uniformized the exception thrown by the load() method when an error occurs. The load() method now + throws Symfony\Component\Translation\Exception\NotFoundResourceException when a resource cannot be found + and Symfony\Component\Translation\Exception\InvalidResourceException when a resource is invalid. + * changed the exception class thrown by some load() methods from \RuntimeException to \InvalidArgumentException + (IcuDatFileLoader, IcuResFileLoader and QtFileLoader) + +2.1.0 +----- + + * added support for more than one fallback locale + * added support for extracting translation messages from templates (Twig and PHP) + * added dumpers for translation catalogs + * added support for QT, gettext, and ResourceBundles diff --git a/public/system/storage/vendor/symfony/translation/Catalogue/AbstractOperation.php b/public/system/storage/vendor/symfony/translation/Catalogue/AbstractOperation.php new file mode 100644 index 0000000..9598e17 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Catalogue/AbstractOperation.php @@ -0,0 +1,171 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +/** + * Base catalogues binary operation class. + * + * A catalogue binary operation performs operation on + * source (the left argument) and target (the right argument) catalogues. + * + * @author Jean-François Simon <contact@jfsimon.fr> + */ +abstract class AbstractOperation implements OperationInterface +{ + /** + * @var MessageCatalogueInterface The source catalogue + */ + protected $source; + + /** + * @var MessageCatalogueInterface The target catalogue + */ + protected $target; + + /** + * @var MessageCatalogue The result catalogue + */ + protected $result; + + /** + * @var null|array The domains affected by this operation + */ + private $domains; + + /** + * This array stores 'all', 'new' and 'obsolete' messages for all valid domains. + * + * The data structure of this array is as follows: + * ```php + * array( + * 'domain 1' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * 'domain 2' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * ... + * ) + * ``` + * + * @var array The array that stores 'all', 'new' and 'obsolete' messages + */ + protected $messages; + + /** + * @param MessageCatalogueInterface $source The source catalogue + * @param MessageCatalogueInterface $target The target catalogue + * + * @throws \LogicException + */ + public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) + { + if ($source->getLocale() !== $target->getLocale()) { + throw new \LogicException('Operated catalogues must belong to the same locale.'); + } + + $this->source = $source; + $this->target = $target; + $this->result = new MessageCatalogue($source->getLocale()); + $this->domains = null; + $this->messages = array(); + } + + /** + * {@inheritdoc} + */ + public function getDomains() + { + if (null === $this->domains) { + $this->domains = array_values(array_unique(array_merge($this->source->getDomains(), $this->target->getDomains()))); + } + + return $this->domains; + } + + /** + * {@inheritdoc} + */ + public function getMessages($domain) + { + if (!in_array($domain, $this->getDomains())) { + throw new \InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); + } + + if (!isset($this->messages[$domain]['all'])) { + $this->processDomain($domain); + } + + return $this->messages[$domain]['all']; + } + + /** + * {@inheritdoc} + */ + public function getNewMessages($domain) + { + if (!in_array($domain, $this->getDomains())) { + throw new \InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); + } + + if (!isset($this->messages[$domain]['new'])) { + $this->processDomain($domain); + } + + return $this->messages[$domain]['new']; + } + + /** + * {@inheritdoc} + */ + public function getObsoleteMessages($domain) + { + if (!in_array($domain, $this->getDomains())) { + throw new \InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); + } + + if (!isset($this->messages[$domain]['obsolete'])) { + $this->processDomain($domain); + } + + return $this->messages[$domain]['obsolete']; + } + + /** + * {@inheritdoc} + */ + public function getResult() + { + foreach ($this->getDomains() as $domain) { + if (!isset($this->messages[$domain])) { + $this->processDomain($domain); + } + } + + return $this->result; + } + + /** + * Performs operation on source and target catalogues for the given domain and + * stores the results. + * + * @param string $domain The domain which the operation will be performed for + */ + abstract protected function processDomain($domain); +} diff --git a/public/system/storage/vendor/symfony/translation/Catalogue/MergeOperation.php b/public/system/storage/vendor/symfony/translation/Catalogue/MergeOperation.php new file mode 100644 index 0000000..6db3f80 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Catalogue/MergeOperation.php @@ -0,0 +1,55 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +/** + * Merge operation between two catalogues as follows: + * all = source ∪ target = {x: x ∈ source ∨ x ∈ target} + * new = all ∖ source = {x: x ∈ target ∧ x ∉ source} + * obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ source ∧ x ∉ target} = ∅ + * Basically, the result contains messages from both catalogues. + * + * @author Jean-François Simon <contact@jfsimon.fr> + */ +class MergeOperation extends AbstractOperation +{ + /** + * {@inheritdoc} + */ + protected function processDomain($domain) + { + $this->messages[$domain] = array( + 'all' => array(), + 'new' => array(), + 'obsolete' => array(), + ); + + foreach ($this->source->all($domain) as $id => $message) { + $this->messages[$domain]['all'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } + + foreach ($this->target->all($domain) as $id => $message) { + if (!$this->source->has($id, $domain)) { + $this->messages[$domain]['all'][$id] = $message; + $this->messages[$domain]['new'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Catalogue/OperationInterface.php b/public/system/storage/vendor/symfony/translation/Catalogue/OperationInterface.php new file mode 100644 index 0000000..87d888e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Catalogue/OperationInterface.php @@ -0,0 +1,77 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +use Symfony\Component\Translation\MessageCatalogueInterface; + +/** + * Represents an operation on catalogue(s). + * + * An instance of this interface performs an operation on one or more catalogues and + * stores intermediate and final results of the operation. + * + * The first catalogue in its argument(s) is called the 'source catalogue' or 'source' and + * the following results are stored: + * + * Messages: also called 'all', are valid messages for the given domain after the operation is performed. + * + * New Messages: also called 'new' (new = all ∖ source = {x: x ∈ all ∧ x ∉ source}). + * + * Obsolete Messages: also called 'obsolete' (obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ all}). + * + * Result: also called 'result', is the resulting catalogue for the given domain that holds the same messages as 'all'. + * + * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com> + */ +interface OperationInterface +{ + /** + * Returns domains affected by operation. + * + * @return array + */ + public function getDomains(); + + /** + * Returns all valid messages ('all') after operation. + * + * @param string $domain + * + * @return array + */ + public function getMessages($domain); + + /** + * Returns new messages ('new') after operation. + * + * @param string $domain + * + * @return array + */ + public function getNewMessages($domain); + + /** + * Returns obsolete messages ('obsolete') after operation. + * + * @param string $domain + * + * @return array + */ + public function getObsoleteMessages($domain); + + /** + * Returns resulting catalogue ('result'). + * + * @return MessageCatalogueInterface + */ + public function getResult(); +} diff --git a/public/system/storage/vendor/symfony/translation/Catalogue/TargetOperation.php b/public/system/storage/vendor/symfony/translation/Catalogue/TargetOperation.php new file mode 100644 index 0000000..e081e13 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Catalogue/TargetOperation.php @@ -0,0 +1,69 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +/** + * Target operation between two catalogues: + * intersection = source ∩ target = {x: x ∈ source ∧ x ∈ target} + * all = intersection ∪ (target ∖ intersection) = target + * new = all ∖ source = {x: x ∈ target ∧ x ∉ source} + * obsolete = source ∖ all = source ∖ target = {x: x ∈ source ∧ x ∉ target} + * Basically, the result contains messages from the target catalogue. + * + * @author Michael Lee <michael.lee@zerustech.com> + */ +class TargetOperation extends AbstractOperation +{ + /** + * {@inheritdoc} + */ + protected function processDomain($domain) + { + $this->messages[$domain] = array( + 'all' => array(), + 'new' => array(), + 'obsolete' => array(), + ); + + // For 'all' messages, the code can't be simplified as ``$this->messages[$domain]['all'] = $target->all($domain);``, + // because doing so will drop messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} + // + // For 'new' messages, the code can't be simplied as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));`` + // because doing so will not exclude messages like {x: x ∈ target ∧ x ∉ source.all ∧ x ∈ source.fallback} + // + // For 'obsolete' messages, the code can't be simplifed as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))`` + // because doing so will not exclude messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} + + foreach ($this->source->all($domain) as $id => $message) { + if ($this->target->has($id, $domain)) { + $this->messages[$domain]['all'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } else { + $this->messages[$domain]['obsolete'][$id] = $message; + } + } + + foreach ($this->target->all($domain) as $id => $message) { + if (!$this->source->has($id, $domain)) { + $this->messages[$domain]['all'][$id] = $message; + $this->messages[$domain]['new'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/DataCollector/TranslationDataCollector.php b/public/system/storage/vendor/symfony/translation/DataCollector/TranslationDataCollector.php new file mode 100644 index 0000000..cb59d0a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/DataCollector/TranslationDataCollector.php @@ -0,0 +1,150 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\DataCollector; +use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; +use Symfony\Component\Translation\DataCollectorTranslator; + +/** + * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> + */ +class TranslationDataCollector extends DataCollector implements LateDataCollectorInterface +{ + /** + * @var DataCollectorTranslator + */ + private $translator; + + /** + * @param DataCollectorTranslator $translator + */ + public function __construct(DataCollectorTranslator $translator) + { + $this->translator = $translator; + } + + /** + * {@inheritdoc} + */ + public function lateCollect() + { + $messages = $this->sanitizeCollectedMessages($this->translator->getCollectedMessages()); + + $this->data = $this->computeCount($messages); + $this->data['messages'] = $messages; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + } + + /** + * @return array + */ + public function getMessages() + { + return isset($this->data['messages']) ? $this->data['messages'] : array(); + } + + /** + * @return int + */ + public function getCountMissings() + { + return isset($this->data[DataCollectorTranslator::MESSAGE_MISSING]) ? $this->data[DataCollectorTranslator::MESSAGE_MISSING] : 0; + } + + /** + * @return int + */ + public function getCountFallbacks() + { + return isset($this->data[DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK]) ? $this->data[DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK] : 0; + } + + /** + * @return int + */ + public function getCountDefines() + { + return isset($this->data[DataCollectorTranslator::MESSAGE_DEFINED]) ? $this->data[DataCollectorTranslator::MESSAGE_DEFINED] : 0; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'translation'; + } + + private function sanitizeCollectedMessages($messages) + { + $result = array(); + foreach ($messages as $key => $message) { + $messageId = $message['locale'].$message['domain'].$message['id']; + + if (!isset($result[$messageId])) { + $message['count'] = 1; + $message['parameters'] = !empty($message['parameters']) ? array($message['parameters']) : array(); + $messages[$key]['translation'] = $this->sanitizeString($message['translation']); + $result[$messageId] = $message; + } else { + if (!empty($message['parameters'])) { + $result[$messageId]['parameters'][] = $message['parameters']; + } + + ++$result[$messageId]['count']; + } + + unset($messages[$key]); + } + + return $result; + } + + private function computeCount($messages) + { + $count = array( + DataCollectorTranslator::MESSAGE_DEFINED => 0, + DataCollectorTranslator::MESSAGE_MISSING => 0, + DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK => 0, + ); + + foreach ($messages as $message) { + ++$count[$message['state']]; + } + + return $count; + } + + private function sanitizeString($string, $length = 80) + { + $string = trim(preg_replace('/\s+/', ' ', $string)); + + if (false !== $encoding = mb_detect_encoding($string, null, true)) { + if (mb_strlen($string, $encoding) > $length) { + return mb_substr($string, 0, $length - 3, $encoding).'...'; + } + } elseif (strlen($string) > $length) { + return substr($string, 0, $length - 3).'...'; + } + + return $string; + } +} diff --git a/public/system/storage/vendor/symfony/translation/DataCollectorTranslator.php b/public/system/storage/vendor/symfony/translation/DataCollectorTranslator.php new file mode 100644 index 0000000..2446723 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/DataCollectorTranslator.php @@ -0,0 +1,152 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> + */ +class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface +{ + const MESSAGE_DEFINED = 0; + const MESSAGE_MISSING = 1; + const MESSAGE_EQUALS_FALLBACK = 2; + + /** + * @var TranslatorInterface|TranslatorBagInterface + */ + private $translator; + + /** + * @var array + */ + private $messages = array(); + + /** + * @param TranslatorInterface $translator The translator must implement TranslatorBagInterface + */ + public function __construct(TranslatorInterface $translator) + { + if (!$translator instanceof TranslatorBagInterface) { + throw new \InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator))); + } + + $this->translator = $translator; + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->trans($id, $parameters, $domain, $locale); + $this->collectMessage($locale, $domain, $id, $trans, $parameters); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale); + $this->collectMessage($locale, $domain, $id, $trans, $parameters, $number); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->translator->setLocale($locale); + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->translator->getLocale(); + } + + /** + * {@inheritdoc} + */ + public function getCatalogue($locale = null) + { + return $this->translator->getCatalogue($locale); + } + + /** + * Passes through all unknown calls onto the translator object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->translator, $method), $args); + } + + /** + * @return array + */ + public function getCollectedMessages() + { + return $this->messages; + } + + /** + * @param string|null $locale + * @param string|null $domain + * @param string $id + * @param string $translation + * @param array|null $parameters + * @param int|null $number + */ + private function collectMessage($locale, $domain, $id, $translation, $parameters = array(), $number = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + $id = (string) $id; + $catalogue = $this->translator->getCatalogue($locale); + $locale = $catalogue->getLocale(); + if ($catalogue->defines($id, $domain)) { + $state = self::MESSAGE_DEFINED; + } elseif ($catalogue->has($id, $domain)) { + $state = self::MESSAGE_EQUALS_FALLBACK; + + $fallbackCatalogue = $catalogue->getFallbackCatalogue(); + while ($fallbackCatalogue) { + if ($fallbackCatalogue->defines($id, $domain)) { + $locale = $fallbackCatalogue->getLocale(); + break; + } + + $fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue(); + } + } else { + $state = self::MESSAGE_MISSING; + } + + $this->messages[] = array( + 'locale' => $locale, + 'domain' => $domain, + 'id' => $id, + 'translation' => $translation, + 'parameters' => $parameters, + 'transChoiceNumber' => $number, + 'state' => $state, + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/CsvFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/CsvFileDumper.php new file mode 100644 index 0000000..fe5dccb --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/CsvFileDumper.php @@ -0,0 +1,63 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * CsvFileDumper generates a csv formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class CsvFileDumper extends FileDumper +{ + private $delimiter = ';'; + private $enclosure = '"'; + + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $handle = fopen('php://memory', 'rb+'); + + foreach ($messages->all($domain) as $source => $target) { + fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure); + } + + rewind($handle); + $output = stream_get_contents($handle); + fclose($handle); + + return $output; + } + + /** + * Sets the delimiter and escape character for CSV. + * + * @param string $delimiter delimiter character + * @param string $enclosure enclosure character + */ + public function setCsvControl($delimiter = ';', $enclosure = '"') + { + $this->delimiter = $delimiter; + $this->enclosure = $enclosure; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'csv'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/DumperInterface.php b/public/system/storage/vendor/symfony/translation/Dumper/DumperInterface.php new file mode 100644 index 0000000..cebc65e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/DumperInterface.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * DumperInterface is the interface implemented by all translation dumpers. + * There is no common option. + * + * @author Michel Salib <michelsalib@hotmail.com> + */ +interface DumperInterface +{ + /** + * Dumps the message catalogue. + * + * @param MessageCatalogue $messages The message catalogue + * @param array $options Options that are used by the dumper + */ + public function dump(MessageCatalogue $messages, $options = array()); +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/FileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/FileDumper.php new file mode 100644 index 0000000..9c9a8ee --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/FileDumper.php @@ -0,0 +1,123 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * FileDumper is an implementation of DumperInterface that dump a message catalogue to file(s). + * Performs backup of already existing files. + * + * Options: + * - path (mandatory): the directory where the files should be saved + * + * @author Michel Salib <michelsalib@hotmail.com> + */ +abstract class FileDumper implements DumperInterface +{ + /** + * A template for the relative paths to files. + * + * @var string + */ + protected $relativePathTemplate = '%domain%.%locale%.%extension%'; + + /** + * Make file backup before the dump. + * + * @var bool + */ + private $backup = true; + + /** + * Sets the template for the relative paths to files. + * + * @param string $relativePathTemplate A template for the relative paths to files + */ + public function setRelativePathTemplate($relativePathTemplate) + { + $this->relativePathTemplate = $relativePathTemplate; + } + + /** + * Sets backup flag. + * + * @param bool + */ + public function setBackup($backup) + { + $this->backup = $backup; + } + + /** + * {@inheritdoc} + */ + public function dump(MessageCatalogue $messages, $options = array()) + { + if (!array_key_exists('path', $options)) { + throw new \InvalidArgumentException('The file dumper needs a path option.'); + } + + // save a file for each domain + foreach ($messages->getDomains() as $domain) { + // backup + $fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale()); + if (file_exists($fullpath)) { + if ($this->backup) { + copy($fullpath, $fullpath.'~'); + } + } else { + $directory = dirname($fullpath); + if (!file_exists($directory) && !@mkdir($directory, 0777, true)) { + throw new \RuntimeException(sprintf('Unable to create directory "%s".', $directory)); + } + } + // save file + file_put_contents($fullpath, $this->formatCatalogue($messages, $domain, $options)); + } + } + + /** + * Transforms a domain of a message catalogue to its string representation. + * + * @param MessageCatalogue $messages + * @param string $domain + * @param array $options + * + * @return string representation + */ + abstract public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()); + + /** + * Gets the file extension of the dumper. + * + * @return string file extension + */ + abstract protected function getExtension(); + + /** + * Gets the relative file path using the template. + * + * @param string $domain The domain + * @param string $locale The locale + * + * @return string The relative file path + */ + private function getRelativePath($domain, $locale) + { + return strtr($this->relativePathTemplate, array( + '%domain%' => $domain, + '%locale%' => $locale, + '%extension%' => $this->getExtension(), + )); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/IcuResFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/IcuResFileDumper.php new file mode 100644 index 0000000..ceb4b42 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/IcuResFileDumper.php @@ -0,0 +1,106 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * IcuResDumper generates an ICU ResourceBundle formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class IcuResFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + protected $relativePathTemplate = '%domain%/%locale%.%extension%'; + + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $data = $indexes = $resources = ''; + + foreach ($messages->all($domain) as $source => $target) { + $indexes .= pack('v', strlen($data) + 28); + $data .= $source."\0"; + } + + $data .= $this->writePadding($data); + + $keyTop = $this->getPosition($data); + + foreach ($messages->all($domain) as $source => $target) { + $resources .= pack('V', $this->getPosition($data)); + + $data .= pack('V', strlen($target)) + .mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') + .$this->writePadding($data) + ; + } + + $resOffset = $this->getPosition($data); + + $data .= pack('v', count($messages)) + .$indexes + .$this->writePadding($data) + .$resources + ; + + $bundleTop = $this->getPosition($data); + + $root = pack('V7', + $resOffset + (2 << 28), // Resource Offset + Resource Type + 6, // Index length + $keyTop, // Index keys top + $bundleTop, // Index resources top + $bundleTop, // Index bundle top + count($messages), // Index max table length + 0 // Index attributes + ); + + $header = pack('vC2v4C12@32', + 32, // Header size + 0xDA, 0x27, // Magic number 1 and 2 + 20, 0, 0, 2, // Rest of the header, ..., Size of a char + 0x52, 0x65, 0x73, 0x42, // Data format identifier + 1, 2, 0, 0, // Data version + 1, 4, 0, 0 // Unicode version + ); + + return $header.$root.$data; + } + + private function writePadding($data) + { + $padding = strlen($data) % 4; + + if ($padding) { + return str_repeat("\xAA", 4 - $padding); + } + } + + private function getPosition($data) + { + return (strlen($data) + 28) / 4; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'res'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/IniFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/IniFileDumper.php new file mode 100644 index 0000000..9ed3754 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/IniFileDumper.php @@ -0,0 +1,45 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * IniFileDumper generates an ini formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class IniFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $output = ''; + + foreach ($messages->all($domain) as $source => $target) { + $escapeTarget = str_replace('"', '\"', $target); + $output .= $source.'="'.$escapeTarget."\"\n"; + } + + return $output; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'ini'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/JsonFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/JsonFileDumper.php new file mode 100644 index 0000000..08b538e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/JsonFileDumper.php @@ -0,0 +1,44 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * JsonFileDumper generates an json formatted string representation of a message catalogue. + * + * @author singles + */ +class JsonFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + if (isset($options['json_encoding'])) { + $flags = $options['json_encoding']; + } else { + $flags = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0; + } + + return json_encode($messages->all($domain), $flags); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'json'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/MoFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/MoFileDumper.php new file mode 100644 index 0000000..f9aae42 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/MoFileDumper.php @@ -0,0 +1,82 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Loader\MoFileLoader; + +/** + * MoFileDumper generates a gettext formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class MoFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $output = $sources = $targets = $sourceOffsets = $targetOffsets = ''; + $offsets = array(); + $size = 0; + + foreach ($messages->all($domain) as $source => $target) { + $offsets[] = array_map('strlen', array($sources, $source, $targets, $target)); + $sources .= "\0".$source; + $targets .= "\0".$target; + ++$size; + } + + $header = array( + 'magicNumber' => MoFileLoader::MO_LITTLE_ENDIAN_MAGIC, + 'formatRevision' => 0, + 'count' => $size, + 'offsetId' => MoFileLoader::MO_HEADER_SIZE, + 'offsetTranslated' => MoFileLoader::MO_HEADER_SIZE + (8 * $size), + 'sizeHashes' => 0, + 'offsetHashes' => MoFileLoader::MO_HEADER_SIZE + (16 * $size), + ); + + $sourcesSize = strlen($sources); + $sourcesStart = $header['offsetHashes'] + 1; + + foreach ($offsets as $offset) { + $sourceOffsets .= $this->writeLong($offset[1]) + .$this->writeLong($offset[0] + $sourcesStart); + $targetOffsets .= $this->writeLong($offset[3]) + .$this->writeLong($offset[2] + $sourcesStart + $sourcesSize); + } + + $output = implode(array_map(array($this, 'writeLong'), $header)) + .$sourceOffsets + .$targetOffsets + .$sources + .$targets + ; + + return $output; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'mo'; + } + + private function writeLong($str) + { + return pack('V*', $str); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/PhpFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/PhpFileDumper.php new file mode 100644 index 0000000..c7c37aa --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/PhpFileDumper.php @@ -0,0 +1,38 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * PhpFileDumper generates PHP files from a message catalogue. + * + * @author Michel Salib <michelsalib@hotmail.com> + */ +class PhpFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + return "<?php\n\nreturn ".var_export($messages->all($domain), true).";\n"; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'php'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/PoFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/PoFileDumper.php new file mode 100644 index 0000000..ed4418b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/PoFileDumper.php @@ -0,0 +1,61 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * PoFileDumper generates a gettext formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class PoFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $output = 'msgid ""'."\n"; + $output .= 'msgstr ""'."\n"; + $output .= '"Content-Type: text/plain; charset=UTF-8\n"'."\n"; + $output .= '"Content-Transfer-Encoding: 8bit\n"'."\n"; + $output .= '"Language: '.$messages->getLocale().'\n"'."\n"; + $output .= "\n"; + + $newLine = false; + foreach ($messages->all($domain) as $source => $target) { + if ($newLine) { + $output .= "\n"; + } else { + $newLine = true; + } + $output .= sprintf('msgid "%s"'."\n", $this->escape($source)); + $output .= sprintf('msgstr "%s"', $this->escape($target)); + } + + return $output; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'po'; + } + + private function escape($str) + { + return addcslashes($str, "\0..\37\42\134"); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/QtFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/QtFileDumper.php new file mode 100644 index 0000000..a9073f2 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/QtFileDumper.php @@ -0,0 +1,50 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * QtFileDumper generates ts files from a message catalogue. + * + * @author Benjamin Eberlei <kontakt@beberlei.de> + */ +class QtFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $dom = new \DOMDocument('1.0', 'utf-8'); + $dom->formatOutput = true; + $ts = $dom->appendChild($dom->createElement('TS')); + $context = $ts->appendChild($dom->createElement('context')); + $context->appendChild($dom->createElement('name', $domain)); + + foreach ($messages->all($domain) as $source => $target) { + $message = $context->appendChild($dom->createElement('message')); + $message->appendChild($dom->createElement('source', $source)); + $message->appendChild($dom->createElement('translation', $target)); + } + + return $dom->saveXML(); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'ts'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/XliffFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/XliffFileDumper.php new file mode 100644 index 0000000..915dbca --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/XliffFileDumper.php @@ -0,0 +1,183 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * XliffFileDumper generates xliff files from a message catalogue. + * + * @author Michel Salib <michelsalib@hotmail.com> + */ +class XliffFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $xliffVersion = '1.2'; + if (array_key_exists('xliff_version', $options)) { + $xliffVersion = $options['xliff_version']; + } + + if (array_key_exists('default_locale', $options)) { + $defaultLocale = $options['default_locale']; + } else { + $defaultLocale = \Locale::getDefault(); + } + + if ('1.2' === $xliffVersion) { + return $this->dumpXliff1($defaultLocale, $messages, $domain, $options); + } + if ('2.0' === $xliffVersion) { + return $this->dumpXliff2($defaultLocale, $messages, $domain, $options); + } + + throw new \InvalidArgumentException(sprintf('No support implemented for dumping XLIFF version "%s".', $xliffVersion)); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'xlf'; + } + + private function dumpXliff1($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) + { + $toolInfo = array('tool-id' => 'symfony', 'tool-name' => 'Symfony'); + if (array_key_exists('tool_info', $options)) { + $toolInfo = array_merge($toolInfo, $options['tool_info']); + } + + $dom = new \DOMDocument('1.0', 'utf-8'); + $dom->formatOutput = true; + + $xliff = $dom->appendChild($dom->createElement('xliff')); + $xliff->setAttribute('version', '1.2'); + $xliff->setAttribute('xmlns', 'urn:oasis:names:tc:xliff:document:1.2'); + + $xliffFile = $xliff->appendChild($dom->createElement('file')); + $xliffFile->setAttribute('source-language', str_replace('_', '-', $defaultLocale)); + $xliffFile->setAttribute('target-language', str_replace('_', '-', $messages->getLocale())); + $xliffFile->setAttribute('datatype', 'plaintext'); + $xliffFile->setAttribute('original', 'file.ext'); + + $xliffHead = $xliffFile->appendChild($dom->createElement('header')); + $xliffTool = $xliffHead->appendChild($dom->createElement('tool')); + foreach ($toolInfo as $id => $value) { + $xliffTool->setAttribute($id, $value); + } + + $xliffBody = $xliffFile->appendChild($dom->createElement('body')); + foreach ($messages->all($domain) as $source => $target) { + $translation = $dom->createElement('trans-unit'); + + $translation->setAttribute('id', md5($source)); + $translation->setAttribute('resname', $source); + + $s = $translation->appendChild($dom->createElement('source')); + $s->appendChild($dom->createTextNode($source)); + + // Does the target contain characters requiring a CDATA section? + $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); + + $targetElement = $dom->createElement('target'); + $metadata = $messages->getMetadata($source, $domain); + if ($this->hasMetadataArrayInfo('target-attributes', $metadata)) { + foreach ($metadata['target-attributes'] as $name => $value) { + $targetElement->setAttribute($name, $value); + } + } + $t = $translation->appendChild($targetElement); + $t->appendChild($text); + + if ($this->hasMetadataArrayInfo('notes', $metadata)) { + foreach ($metadata['notes'] as $note) { + if (!isset($note['content'])) { + continue; + } + + $n = $translation->appendChild($dom->createElement('note')); + $n->appendChild($dom->createTextNode($note['content'])); + + if (isset($note['priority'])) { + $n->setAttribute('priority', $note['priority']); + } + + if (isset($note['from'])) { + $n->setAttribute('from', $note['from']); + } + } + } + + $xliffBody->appendChild($translation); + } + + return $dom->saveXML(); + } + + private function dumpXliff2($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) + { + $dom = new \DOMDocument('1.0', 'utf-8'); + $dom->formatOutput = true; + + $xliff = $dom->appendChild($dom->createElement('xliff')); + $xliff->setAttribute('xmlns', 'urn:oasis:names:tc:xliff:document:2.0'); + $xliff->setAttribute('version', '2.0'); + $xliff->setAttribute('srcLang', str_replace('_', '-', $defaultLocale)); + $xliff->setAttribute('trgLang', str_replace('_', '-', $messages->getLocale())); + + $xliffFile = $xliff->appendChild($dom->createElement('file')); + $xliffFile->setAttribute('id', $domain.'.'.$messages->getLocale()); + + foreach ($messages->all($domain) as $source => $target) { + $translation = $dom->createElement('unit'); + $translation->setAttribute('id', md5($source)); + + $segment = $translation->appendChild($dom->createElement('segment')); + + $s = $segment->appendChild($dom->createElement('source')); + $s->appendChild($dom->createTextNode($source)); + + // Does the target contain characters requiring a CDATA section? + $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); + + $targetElement = $dom->createElement('target'); + $metadata = $messages->getMetadata($source, $domain); + if ($this->hasMetadataArrayInfo('target-attributes', $metadata)) { + foreach ($metadata['target-attributes'] as $name => $value) { + $targetElement->setAttribute($name, $value); + } + } + $t = $segment->appendChild($targetElement); + $t->appendChild($text); + + $xliffFile->appendChild($translation); + } + + return $dom->saveXML(); + } + + /** + * @param string $key + * @param array|null $metadata + * + * @return bool + */ + private function hasMetadataArrayInfo($key, $metadata = null) + { + return null !== $metadata && array_key_exists($key, $metadata) && ($metadata[$key] instanceof \Traversable || is_array($metadata[$key])); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/YamlFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/YamlFileDumper.php new file mode 100644 index 0000000..625953c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/YamlFileDumper.php @@ -0,0 +1,54 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Util\ArrayConverter; +use Symfony\Component\Yaml\Yaml; + +/** + * YamlFileDumper generates yaml files from a message catalogue. + * + * @author Michel Salib <michelsalib@hotmail.com> + */ +class YamlFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + if (!class_exists('Symfony\Component\Yaml\Yaml')) { + throw new \LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.'); + } + + $data = $messages->all($domain); + + if (isset($options['as_tree']) && $options['as_tree']) { + $data = ArrayConverter::expandToTree($data); + } + + if (isset($options['inline']) && ($inline = (int) $options['inline']) > 0) { + return Yaml::dump($data, $inline); + } + + return Yaml::dump($data); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'yml'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Exception/ExceptionInterface.php b/public/system/storage/vendor/symfony/translation/Exception/ExceptionInterface.php new file mode 100644 index 0000000..c85fb93 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Exception interface for all exceptions thrown by the component. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +interface ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/translation/Exception/InvalidResourceException.php b/public/system/storage/vendor/symfony/translation/Exception/InvalidResourceException.php new file mode 100644 index 0000000..cf07943 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Exception/InvalidResourceException.php @@ -0,0 +1,21 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Thrown when a resource cannot be loaded. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class InvalidResourceException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/translation/Exception/NotFoundResourceException.php b/public/system/storage/vendor/symfony/translation/Exception/NotFoundResourceException.php new file mode 100644 index 0000000..cff73ae --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Exception/NotFoundResourceException.php @@ -0,0 +1,21 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Thrown when a resource does not exist. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class NotFoundResourceException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/translation/Extractor/AbstractFileExtractor.php b/public/system/storage/vendor/symfony/translation/Extractor/AbstractFileExtractor.php new file mode 100644 index 0000000..57fd493 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Extractor/AbstractFileExtractor.php @@ -0,0 +1,83 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +/** + * Base class used by classes that extract translation messages from files. + * + * @author Marcos D. Sánchez <marcosdsanchez@gmail.com> + */ +abstract class AbstractFileExtractor +{ + /** + * @param string|array $resource files, a file or a directory + * + * @return array + */ + protected function extractFiles($resource) + { + if (is_array($resource) || $resource instanceof \Traversable) { + $files = array(); + foreach ($resource as $file) { + if ($this->canBeExtracted($file)) { + $files[] = $this->toSplFileInfo($file); + } + } + } elseif (is_file($resource)) { + $files = $this->canBeExtracted($resource) ? array($this->toSplFileInfo($resource)) : array(); + } else { + $files = $this->extractFromDirectory($resource); + } + + return $files; + } + + /** + * @param string $file + * + * @return \SplFileInfo + */ + private function toSplFileInfo($file) + { + return ($file instanceof \SplFileInfo) ? $file : new \SplFileInfo($file); + } + + /** + * @param string $file + * + * @return bool + * + * @throws \InvalidArgumentException + */ + protected function isFile($file) + { + if (!is_file($file)) { + throw new \InvalidArgumentException(sprintf('The "%s" file does not exist.', $file)); + } + + return true; + } + + /** + * @param string $file + * + * @return bool + */ + abstract protected function canBeExtracted($file); + + /** + * @param string|array $resource files, a file or a directory + * + * @return array files to be extracted + */ + abstract protected function extractFromDirectory($resource); +} diff --git a/public/system/storage/vendor/symfony/translation/Extractor/ChainExtractor.php b/public/system/storage/vendor/symfony/translation/Extractor/ChainExtractor.php new file mode 100644 index 0000000..50e3c84 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Extractor/ChainExtractor.php @@ -0,0 +1,60 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * ChainExtractor extracts translation messages from template files. + * + * @author Michel Salib <michelsalib@hotmail.com> + */ +class ChainExtractor implements ExtractorInterface +{ + /** + * The extractors. + * + * @var ExtractorInterface[] + */ + private $extractors = array(); + + /** + * Adds a loader to the translation extractor. + * + * @param string $format The format of the loader + * @param ExtractorInterface $extractor The loader + */ + public function addExtractor($format, ExtractorInterface $extractor) + { + $this->extractors[$format] = $extractor; + } + + /** + * {@inheritdoc} + */ + public function setPrefix($prefix) + { + foreach ($this->extractors as $extractor) { + $extractor->setPrefix($prefix); + } + } + + /** + * {@inheritdoc} + */ + public function extract($directory, MessageCatalogue $catalogue) + { + foreach ($this->extractors as $extractor) { + $extractor->extract($directory, $catalogue); + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Extractor/ExtractorInterface.php b/public/system/storage/vendor/symfony/translation/Extractor/ExtractorInterface.php new file mode 100644 index 0000000..438f80b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Extractor/ExtractorInterface.php @@ -0,0 +1,38 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * Extracts translation messages from a directory or files to the catalogue. + * New found messages are injected to the catalogue using the prefix. + * + * @author Michel Salib <michelsalib@hotmail.com> + */ +interface ExtractorInterface +{ + /** + * Extracts translation messages from files, a file or a directory to the catalogue. + * + * @param string|array $resource files, a file or a directory + * @param MessageCatalogue $catalogue The catalogue + */ + public function extract($resource, MessageCatalogue $catalogue); + + /** + * Sets the prefix that should be used for new found messages. + * + * @param string $prefix The prefix + */ + public function setPrefix($prefix); +} diff --git a/public/system/storage/vendor/symfony/translation/IdentityTranslator.php b/public/system/storage/vendor/symfony/translation/IdentityTranslator.php new file mode 100644 index 0000000..46a0463 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/IdentityTranslator.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * IdentityTranslator does not translate anything. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class IdentityTranslator implements TranslatorInterface +{ + private $selector; + private $locale; + + /** + * Constructor. + * + * @param MessageSelector|null $selector The message selector for pluralization + */ + public function __construct(MessageSelector $selector = null) + { + $this->selector = $selector ?: new MessageSelector(); + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->locale = $locale; + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->locale ?: \Locale::getDefault(); + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + return strtr((string) $id, $parameters); + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + return strtr($this->selector->choose((string) $id, (int) $number, $locale ?: $this->getLocale()), $parameters); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Interval.php b/public/system/storage/vendor/symfony/translation/Interval.php new file mode 100644 index 0000000..2a51156 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Interval.php @@ -0,0 +1,107 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * Tests if a given number belongs to a given math interval. + * + * An interval can represent a finite set of numbers: + * + * {1,2,3,4} + * + * An interval can represent numbers between two numbers: + * + * [1, +Inf] + * ]-1,2[ + * + * The left delimiter can be [ (inclusive) or ] (exclusive). + * The right delimiter can be [ (exclusive) or ] (inclusive). + * Beside numbers, you can use -Inf and +Inf for the infinite. + * + * @author Fabien Potencier <fabien@symfony.com> + * + * @see http://en.wikipedia.org/wiki/Interval_%28mathematics%29#The_ISO_notation + */ +class Interval +{ + /** + * Tests if the given number is in the math interval. + * + * @param int $number A number + * @param string $interval An interval + * + * @return bool + * + * @throws \InvalidArgumentException + */ + public static function test($number, $interval) + { + $interval = trim($interval); + + if (!preg_match('/^'.self::getIntervalRegexp().'$/x', $interval, $matches)) { + throw new \InvalidArgumentException(sprintf('"%s" is not a valid interval.', $interval)); + } + + if ($matches[1]) { + foreach (explode(',', $matches[2]) as $n) { + if ($number == $n) { + return true; + } + } + } else { + $leftNumber = self::convertNumber($matches['left']); + $rightNumber = self::convertNumber($matches['right']); + + return + ('[' === $matches['left_delimiter'] ? $number >= $leftNumber : $number > $leftNumber) + && (']' === $matches['right_delimiter'] ? $number <= $rightNumber : $number < $rightNumber) + ; + } + + return false; + } + + /** + * Returns a Regexp that matches valid intervals. + * + * @return string A Regexp (without the delimiters) + */ + public static function getIntervalRegexp() + { + return <<<EOF + ({\s* + (\-?\d+(\.\d+)?[\s*,\s*\-?\d+(\.\d+)?]*) + \s*}) + + | + + (?P<left_delimiter>[\[\]]) + \s* + (?P<left>-Inf|\-?\d+(\.\d+)?) + \s*,\s* + (?P<right>\+?Inf|\-?\d+(\.\d+)?) + \s* + (?P<right_delimiter>[\[\]]) +EOF; + } + + private static function convertNumber($number) + { + if ('-Inf' === $number) { + return log(0); + } elseif ('+Inf' === $number || 'Inf' === $number) { + return -log(0); + } + + return (float) $number; + } +} diff --git a/public/system/storage/vendor/symfony/translation/LICENSE b/public/system/storage/vendor/symfony/translation/LICENSE new file mode 100644 index 0000000..12a7453 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2016 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/system/storage/vendor/symfony/translation/Loader/ArrayLoader.php b/public/system/storage/vendor/symfony/translation/Loader/ArrayLoader.php new file mode 100644 index 0000000..9a595b7 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/ArrayLoader.php @@ -0,0 +1,66 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * ArrayLoader loads translations from a PHP array. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class ArrayLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + $this->flatten($resource); + $catalogue = new MessageCatalogue($locale); + $catalogue->add($resource, $domain); + + return $catalogue; + } + + /** + * Flattens an nested array of translations. + * + * The scheme used is: + * 'key' => array('key2' => array('key3' => 'value')) + * Becomes: + * 'key.key2.key3' => 'value' + * + * This function takes an array by reference and will modify it + * + * @param array &$messages The array that will be flattened + * @param array $subnode Current subnode being parsed, used internally for recursive calls + * @param string $path Current path being parsed, used internally for recursive calls + */ + private function flatten(array &$messages, array $subnode = null, $path = null) + { + if (null === $subnode) { + $subnode = &$messages; + } + foreach ($subnode as $key => $value) { + if (is_array($value)) { + $nodePath = $path ? $path.'.'.$key : $key; + $this->flatten($messages, $value, $nodePath); + if (null === $path) { + unset($messages[$key]); + } + } elseif (null !== $path) { + $messages[$path.'.'.$key] = $value; + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/CsvFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/CsvFileLoader.php new file mode 100644 index 0000000..f1d3443 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/CsvFileLoader.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\NotFoundResourceException; + +/** + * CsvFileLoader loads translations from CSV files. + * + * @author Saša Stamenković <umpirsky@gmail.com> + */ +class CsvFileLoader extends FileLoader +{ + private $delimiter = ';'; + private $enclosure = '"'; + private $escape = '\\'; + + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $messages = array(); + + try { + $file = new \SplFileObject($resource, 'rb'); + } catch (\RuntimeException $e) { + throw new NotFoundResourceException(sprintf('Error opening file "%s".', $resource), 0, $e); + } + + $file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY); + $file->setCsvControl($this->delimiter, $this->enclosure, $this->escape); + + foreach ($file as $data) { + if ('#' !== substr($data[0], 0, 1) && isset($data[1]) && 2 === count($data)) { + $messages[$data[0]] = $data[1]; + } + } + + return $messages; + } + + /** + * Sets the delimiter, enclosure, and escape character for CSV. + * + * @param string $delimiter delimiter character + * @param string $enclosure enclosure character + * @param string $escape escape character + */ + public function setCsvControl($delimiter = ';', $enclosure = '"', $escape = '\\') + { + $this->delimiter = $delimiter; + $this->enclosure = $enclosure; + $this->escape = $escape; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/FileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/FileLoader.php new file mode 100644 index 0000000..a7f24f4 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/FileLoader.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> + */ +abstract class FileLoader extends ArrayLoader +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + $messages = $this->loadResource($resource); + + // empty resource + if (null === $messages) { + $messages = array(); + } + + // not an array + if (!is_array($messages)) { + throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); + } + + $catalogue = parent::load($messages, $locale, $domain); + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource)); + } + + return $catalogue; + } + + /* + * @param string $resource + * + * @return array + * + * @throws InvalidResourceException If stream content has an invalid format. + */ + abstract protected function loadResource($resource); +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/IcuDatFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/IcuDatFileLoader.php new file mode 100644 index 0000000..71ba90a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/IcuDatFileLoader.php @@ -0,0 +1,62 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * IcuResFileLoader loads translations from a resource bundle. + * + * @author stealth35 + */ +class IcuDatFileLoader extends IcuResFileLoader +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource.'.dat')) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource.'.dat')) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + try { + $rb = new \ResourceBundle($locale, $resource); + } catch (\Exception $e) { + // HHVM compatibility: constructor throws on invalid resource + $rb = null; + } + + if (!$rb) { + throw new InvalidResourceException(sprintf('Cannot load resource "%s"', $resource)); + } elseif (intl_is_failure($rb->getErrorCode())) { + throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); + } + + $messages = $this->flatten($rb); + $catalogue = new MessageCatalogue($locale); + $catalogue->add($messages, $domain); + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource.'.dat')); + } + + return $catalogue; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/IcuResFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/IcuResFileLoader.php new file mode 100644 index 0000000..2f8037f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/IcuResFileLoader.php @@ -0,0 +1,92 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\DirectoryResource; + +/** + * IcuResFileLoader loads translations from a resource bundle. + * + * @author stealth35 + */ +class IcuResFileLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!is_dir($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + try { + $rb = new \ResourceBundle($locale, $resource); + } catch (\Exception $e) { + // HHVM compatibility: constructor throws on invalid resource + $rb = null; + } + + if (!$rb) { + throw new InvalidResourceException(sprintf('Cannot load resource "%s"', $resource)); + } elseif (intl_is_failure($rb->getErrorCode())) { + throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); + } + + $messages = $this->flatten($rb); + $catalogue = new MessageCatalogue($locale); + $catalogue->add($messages, $domain); + + if (class_exists('Symfony\Component\Config\Resource\DirectoryResource')) { + $catalogue->addResource(new DirectoryResource($resource)); + } + + return $catalogue; + } + + /** + * Flattens an ResourceBundle. + * + * The scheme used is: + * key { key2 { key3 { "value" } } } + * Becomes: + * 'key.key2.key3' => 'value' + * + * This function takes an array by reference and will modify it + * + * @param \ResourceBundle $rb the ResourceBundle that will be flattened + * @param array $messages used internally for recursive calls + * @param string $path current path being parsed, used internally for recursive calls + * + * @return array the flattened ResourceBundle + */ + protected function flatten(\ResourceBundle $rb, array &$messages = array(), $path = null) + { + foreach ($rb as $key => $value) { + $nodePath = $path ? $path.'.'.$key : $key; + if ($value instanceof \ResourceBundle) { + $this->flatten($value, $messages, $nodePath); + } else { + $messages[$nodePath] = $value; + } + } + + return $messages; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/IniFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/IniFileLoader.php new file mode 100644 index 0000000..11d9b27 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/IniFileLoader.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +/** + * IniFileLoader loads translations from an ini file. + * + * @author stealth35 + */ +class IniFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + return parse_ini_file($resource, true); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/JsonFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/JsonFileLoader.php new file mode 100644 index 0000000..ce4e91f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/JsonFileLoader.php @@ -0,0 +1,64 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; + +/** + * JsonFileLoader loads translations from an json file. + * + * @author singles + */ +class JsonFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $messages = array(); + if ($data = file_get_contents($resource)) { + $messages = json_decode($data, true); + + if (0 < $errorCode = json_last_error()) { + throw new InvalidResourceException(sprintf('Error parsing JSON - %s', $this->getJSONErrorMessage($errorCode))); + } + } + + return $messages; + } + + /** + * Translates JSON_ERROR_* constant into meaningful message. + * + * @param int $errorCode Error code returned by json_last_error() call + * + * @return string Message string + */ + private function getJSONErrorMessage($errorCode) + { + switch ($errorCode) { + case JSON_ERROR_DEPTH: + return 'Maximum stack depth exceeded'; + case JSON_ERROR_STATE_MISMATCH: + return 'Underflow or the modes mismatch'; + case JSON_ERROR_CTRL_CHAR: + return 'Unexpected control character found'; + case JSON_ERROR_SYNTAX: + return 'Syntax error, malformed JSON'; + case JSON_ERROR_UTF8: + return 'Malformed UTF-8 characters, possibly incorrectly encoded'; + default: + return 'Unknown error'; + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/LoaderInterface.php b/public/system/storage/vendor/symfony/translation/Loader/LoaderInterface.php new file mode 100644 index 0000000..6b65fe3 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/LoaderInterface.php @@ -0,0 +1,38 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; + +/** + * LoaderInterface is the interface implemented by all translation loaders. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +interface LoaderInterface +{ + /** + * Loads a locale. + * + * @param mixed $resource A resource + * @param string $locale A locale + * @param string $domain The domain + * + * @return MessageCatalogue A MessageCatalogue instance + * + * @throws NotFoundResourceException when the resource cannot be found + * @throws InvalidResourceException when the resource cannot be loaded + */ + public function load($resource, $locale, $domain = 'messages'); +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/MoFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/MoFileLoader.php new file mode 100644 index 0000000..2fcada2 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/MoFileLoader.php @@ -0,0 +1,154 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; + +/** + * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) + */ +class MoFileLoader extends FileLoader +{ + /** + * Magic used for validating the format of a MO file as well as + * detecting if the machine used to create that file was little endian. + * + * @var float + */ + const MO_LITTLE_ENDIAN_MAGIC = 0x950412de; + + /** + * Magic used for validating the format of a MO file as well as + * detecting if the machine used to create that file was big endian. + * + * @var float + */ + const MO_BIG_ENDIAN_MAGIC = 0xde120495; + + /** + * The size of the header of a MO file in bytes. + * + * @var int Number of bytes + */ + const MO_HEADER_SIZE = 28; + + /** + * Parses machine object (MO) format, independent of the machine's endian it + * was created on. Both 32bit and 64bit systems are supported. + * + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $stream = fopen($resource, 'r'); + + $stat = fstat($stream); + + if ($stat['size'] < self::MO_HEADER_SIZE) { + throw new InvalidResourceException('MO stream content has an invalid format.'); + } + $magic = unpack('V1', fread($stream, 4)); + $magic = hexdec(substr(dechex(current($magic)), -8)); + + if ($magic == self::MO_LITTLE_ENDIAN_MAGIC) { + $isBigEndian = false; + } elseif ($magic == self::MO_BIG_ENDIAN_MAGIC) { + $isBigEndian = true; + } else { + throw new InvalidResourceException('MO stream content has an invalid format.'); + } + + // formatRevision + $this->readLong($stream, $isBigEndian); + $count = $this->readLong($stream, $isBigEndian); + $offsetId = $this->readLong($stream, $isBigEndian); + $offsetTranslated = $this->readLong($stream, $isBigEndian); + // sizeHashes + $this->readLong($stream, $isBigEndian); + // offsetHashes + $this->readLong($stream, $isBigEndian); + + $messages = array(); + + for ($i = 0; $i < $count; ++$i) { + $singularId = $pluralId = null; + $translated = null; + + fseek($stream, $offsetId + $i * 8); + + $length = $this->readLong($stream, $isBigEndian); + $offset = $this->readLong($stream, $isBigEndian); + + if ($length < 1) { + continue; + } + + fseek($stream, $offset); + $singularId = fread($stream, $length); + + if (strpos($singularId, "\000") !== false) { + list($singularId, $pluralId) = explode("\000", $singularId); + } + + fseek($stream, $offsetTranslated + $i * 8); + $length = $this->readLong($stream, $isBigEndian); + $offset = $this->readLong($stream, $isBigEndian); + + if ($length < 1) { + continue; + } + + fseek($stream, $offset); + $translated = fread($stream, $length); + + if (strpos($translated, "\000") !== false) { + $translated = explode("\000", $translated); + } + + $ids = array('singular' => $singularId, 'plural' => $pluralId); + $item = compact('ids', 'translated'); + + if (is_array($item['translated'])) { + $messages[$item['ids']['singular']] = stripcslashes($item['translated'][0]); + if (isset($item['ids']['plural'])) { + $plurals = array(); + foreach ($item['translated'] as $plural => $translated) { + $plurals[] = sprintf('{%d} %s', $plural, $translated); + } + $messages[$item['ids']['plural']] = stripcslashes(implode('|', $plurals)); + } + } elseif (!empty($item['ids']['singular'])) { + $messages[$item['ids']['singular']] = stripcslashes($item['translated']); + } + } + + fclose($stream); + + return array_filter($messages); + } + + /** + * Reads an unsigned long from stream respecting endianess. + * + * @param resource $stream + * @param bool $isBigEndian + * + * @return int + */ + private function readLong($stream, $isBigEndian) + { + $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4)); + $result = current($result); + + return (int) substr($result, -8); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/PhpFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/PhpFileLoader.php new file mode 100644 index 0000000..a0050e8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/PhpFileLoader.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +/** + * PhpFileLoader loads translations from PHP files returning an array of translations. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class PhpFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + return require $resource; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/PoFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/PoFileLoader.php new file mode 100644 index 0000000..40f5464 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/PoFileLoader.php @@ -0,0 +1,151 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +/** + * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) + * @copyright Copyright (c) 2012, Clemens Tolboom + */ +class PoFileLoader extends FileLoader +{ + /** + * Parses portable object (PO) format. + * + * From http://www.gnu.org/software/gettext/manual/gettext.html#PO-Files + * we should be able to parse files having: + * + * white-space + * # translator-comments + * #. extracted-comments + * #: reference... + * #, flag... + * #| msgid previous-untranslated-string + * msgid untranslated-string + * msgstr translated-string + * + * extra or different lines are: + * + * #| msgctxt previous-context + * #| msgid previous-untranslated-string + * msgctxt context + * + * #| msgid previous-untranslated-string-singular + * #| msgid_plural previous-untranslated-string-plural + * msgid untranslated-string-singular + * msgid_plural untranslated-string-plural + * msgstr[0] translated-string-case-0 + * ... + * msgstr[N] translated-string-case-n + * + * The definition states: + * - white-space and comments are optional. + * - msgid "" that an empty singleline defines a header. + * + * This parser sacrifices some features of the reference implementation the + * differences to that implementation are as follows. + * - No support for comments spanning multiple lines. + * - Translator and extracted comments are treated as being the same type. + * - Message IDs are allowed to have other encodings as just US-ASCII. + * + * Items with an empty id are ignored. + * + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $stream = fopen($resource, 'r'); + + $defaults = array( + 'ids' => array(), + 'translated' => null, + ); + + $messages = array(); + $item = $defaults; + $flags = array(); + + while ($line = fgets($stream)) { + $line = trim($line); + + if ($line === '') { + // Whitespace indicated current item is done + if (!in_array('fuzzy', $flags)) { + $this->addMessage($messages, $item); + } + $item = $defaults; + $flags = array(); + } elseif (substr($line, 0, 2) === '#,') { + $flags = array_map('trim', explode(',', substr($line, 2))); + } elseif (substr($line, 0, 7) === 'msgid "') { + // We start a new msg so save previous + // TODO: this fails when comments or contexts are added + $this->addMessage($messages, $item); + $item = $defaults; + $item['ids']['singular'] = substr($line, 7, -1); + } elseif (substr($line, 0, 8) === 'msgstr "') { + $item['translated'] = substr($line, 8, -1); + } elseif ($line[0] === '"') { + $continues = isset($item['translated']) ? 'translated' : 'ids'; + + if (is_array($item[$continues])) { + end($item[$continues]); + $item[$continues][key($item[$continues])] .= substr($line, 1, -1); + } else { + $item[$continues] .= substr($line, 1, -1); + } + } elseif (substr($line, 0, 14) === 'msgid_plural "') { + $item['ids']['plural'] = substr($line, 14, -1); + } elseif (substr($line, 0, 7) === 'msgstr[') { + $size = strpos($line, ']'); + $item['translated'][(int) substr($line, 7, 1)] = substr($line, $size + 3, -1); + } + } + // save last item + if (!in_array('fuzzy', $flags)) { + $this->addMessage($messages, $item); + } + fclose($stream); + + return $messages; + } + + /** + * Save a translation item to the messages. + * + * A .po file could contain by error missing plural indexes. We need to + * fix these before saving them. + * + * @param array $messages + * @param array $item + */ + private function addMessage(array &$messages, array $item) + { + if (is_array($item['translated'])) { + $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated'][0]); + if (isset($item['ids']['plural'])) { + $plurals = $item['translated']; + // PO are by definition indexed so sort by index. + ksort($plurals); + // Make sure every index is filled. + end($plurals); + $count = key($plurals); + // Fill missing spots with '-'. + $empties = array_fill(0, $count + 1, '-'); + $plurals += $empties; + ksort($plurals); + $messages[stripcslashes($item['ids']['plural'])] = stripcslashes(implode('|', $plurals)); + } + } elseif (!empty($item['ids']['singular'])) { + $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated']); + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/QtFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/QtFileLoader.php new file mode 100644 index 0000000..657bd6e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/QtFileLoader.php @@ -0,0 +1,77 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * QtFileLoader loads translations from QT Translations XML files. + * + * @author Benjamin Eberlei <kontakt@beberlei.de> + */ +class QtFileLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + try { + $dom = XmlUtils::loadFile($resource); + } catch (\InvalidArgumentException $e) { + throw new InvalidResourceException(sprintf('Unable to load "%s".', $resource), $e->getCode(), $e); + } + + $internalErrors = libxml_use_internal_errors(true); + libxml_clear_errors(); + + $xpath = new \DOMXPath($dom); + $nodes = $xpath->evaluate('//TS/context/name[text()="'.$domain.'"]'); + + $catalogue = new MessageCatalogue($locale); + if ($nodes->length == 1) { + $translations = $nodes->item(0)->nextSibling->parentNode->parentNode->getElementsByTagName('message'); + foreach ($translations as $translation) { + $translationValue = (string) $translation->getElementsByTagName('translation')->item(0)->nodeValue; + + if (!empty($translationValue)) { + $catalogue->set( + (string) $translation->getElementsByTagName('source')->item(0)->nodeValue, + $translationValue, + $domain + ); + } + $translation = $translation->nextSibling; + } + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource)); + } + } + + libxml_use_internal_errors($internalErrors); + + return $catalogue; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/XliffFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/XliffFileLoader.php new file mode 100644 index 0000000..d3fbec9 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/XliffFileLoader.php @@ -0,0 +1,321 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * XliffFileLoader loads translations from XLIFF files. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class XliffFileLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + $catalogue = new MessageCatalogue($locale); + $this->extract($resource, $catalogue, $domain); + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource)); + } + + return $catalogue; + } + + private function extract($resource, MessageCatalogue $catalogue, $domain) + { + try { + $dom = XmlUtils::loadFile($resource); + } catch (\InvalidArgumentException $e) { + throw new InvalidResourceException(sprintf('Unable to load "%s": %s', $resource, $e->getMessage()), $e->getCode(), $e); + } + + $xliffVersion = $this->getVersionNumber($dom); + $this->validateSchema($xliffVersion, $dom, $this->getSchema($xliffVersion)); + + if ('1.2' === $xliffVersion) { + $this->extractXliff1($dom, $catalogue, $domain); + } + + if ('2.0' === $xliffVersion) { + $this->extractXliff2($dom, $catalogue, $domain); + } + } + + /** + * Extract messages and metadata from DOMDocument into a MessageCatalogue. + * + * @param \DOMDocument $dom Source to extract messages and metadata + * @param MessageCatalogue $catalogue Catalogue where we'll collect messages and metadata + * @param string $domain The domain + */ + private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, $domain) + { + $xml = simplexml_import_dom($dom); + $encoding = strtoupper($dom->encoding); + + $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:1.2'); + foreach ($xml->xpath('//xliff:trans-unit') as $translation) { + $attributes = $translation->attributes(); + + if (!(isset($attributes['resname']) || isset($translation->source))) { + continue; + } + + $source = isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source; + // If the xlf file has another encoding specified, try to convert it because + // simple_xml will always return utf-8 encoded values + $target = $this->utf8ToCharset((string) (isset($translation->target) ? $translation->target : $source), $encoding); + + $catalogue->set((string) $source, $target, $domain); + + $metadata = array(); + if ($notes = $this->parseNotesMetadata($translation->note, $encoding)) { + $metadata['notes'] = $notes; + } + if (isset($translation->target) && $translation->target->attributes()) { + $metadata['target-attributes'] = array(); + foreach ($translation->target->attributes() as $key => $value) { + $metadata['target-attributes'][$key] = (string) $value; + } + } + + $catalogue->setMetadata((string) $source, $metadata, $domain); + } + } + + /** + * @param \DOMDocument $dom + * @param MessageCatalogue $catalogue + * @param string $domain + */ + private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, $domain) + { + $xml = simplexml_import_dom($dom); + $encoding = strtoupper($dom->encoding); + + $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:2.0'); + + foreach ($xml->xpath('//xliff:unit/xliff:segment') as $segment) { + $source = $segment->source; + + // If the xlf file has another encoding specified, try to convert it because + // simple_xml will always return utf-8 encoded values + $target = $this->utf8ToCharset((string) (isset($segment->target) ? $segment->target : $source), $encoding); + + $catalogue->set((string) $source, $target, $domain); + + $metadata = array(); + if (isset($segment->target) && $segment->target->attributes()) { + $metadata['target-attributes'] = array(); + foreach ($segment->target->attributes() as $key => $value) { + $metadata['target-attributes'][$key] = (string) $value; + } + } + + $catalogue->setMetadata((string) $source, $metadata, $domain); + } + } + + /** + * Convert a UTF8 string to the specified encoding. + * + * @param string $content String to decode + * @param string $encoding Target encoding + * + * @return string + */ + private function utf8ToCharset($content, $encoding = null) + { + if ('UTF-8' !== $encoding && !empty($encoding)) { + return mb_convert_encoding($content, $encoding, 'UTF-8'); + } + + return $content; + } + + /** + * Validates and parses the given file into a DOMDocument. + * + * @param string $file + * @param \DOMDocument $dom + * @param string $schema source of the schema + * + * @throws InvalidResourceException + */ + private function validateSchema($file, \DOMDocument $dom, $schema) + { + $internalErrors = libxml_use_internal_errors(true); + + $disableEntities = libxml_disable_entity_loader(false); + + if (!@$dom->schemaValidateSource($schema)) { + libxml_disable_entity_loader($disableEntities); + + throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $file, implode("\n", $this->getXmlErrors($internalErrors)))); + } + + libxml_disable_entity_loader($disableEntities); + + $dom->normalizeDocument(); + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + } + + private function getSchema($xliffVersion) + { + if ('1.2' === $xliffVersion) { + $schemaSource = file_get_contents(__DIR__.'/schema/dic/xliff-core/xliff-core-1.2-strict.xsd'); + $xmlUri = 'http://www.w3.org/2001/xml.xsd'; + } elseif ('2.0' === $xliffVersion) { + $schemaSource = file_get_contents(__DIR__.'/schema/dic/xliff-core/xliff-core-2.0.xsd'); + $xmlUri = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd'; + } else { + throw new \InvalidArgumentException(sprintf('No support implemented for loading XLIFF version "%s".', $xliffVersion)); + } + + return $this->fixXmlLocation($schemaSource, $xmlUri); + } + + /** + * Internally changes the URI of a dependent xsd to be loaded locally. + * + * @param string $schemaSource Current content of schema file + * @param string $xmlUri External URI of XML to convert to local + * + * @return string + */ + private function fixXmlLocation($schemaSource, $xmlUri) + { + $newPath = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd'; + $parts = explode('/', $newPath); + if (0 === stripos($newPath, 'phar://')) { + $tmpfile = tempnam(sys_get_temp_dir(), 'sf2'); + if ($tmpfile) { + copy($newPath, $tmpfile); + $parts = explode('/', str_replace('\\', '/', $tmpfile)); + } + } + $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; + $newPath = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts)); + + return str_replace($xmlUri, $newPath, $schemaSource); + } + + /** + * Returns the XML errors of the internal XML parser. + * + * @param bool $internalErrors + * + * @return array An array of errors + */ + private function getXmlErrors($internalErrors) + { + $errors = array(); + foreach (libxml_get_errors() as $error) { + $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', + LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', + $error->code, + trim($error->message), + $error->file ?: 'n/a', + $error->line, + $error->column + ); + } + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + + return $errors; + } + + /** + * Gets xliff file version based on the root "version" attribute. + * Defaults to 1.2 for backwards compatibility. + * + * @param \DOMDocument $dom + * + * @throws \InvalidArgumentException + * + * @return string + */ + private function getVersionNumber(\DOMDocument $dom) + { + /** @var \DOMNode $xliff */ + foreach ($dom->getElementsByTagName('xliff') as $xliff) { + $version = $xliff->attributes->getNamedItem('version'); + if ($version) { + return $version->nodeValue; + } + + $namespace = $xliff->attributes->getNamedItem('xmlns'); + if ($namespace) { + if (substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34) !== 0) { + throw new \InvalidArgumentException(sprintf('Not a valid XLIFF namespace "%s"', $namespace)); + } + + return substr($namespace, 34); + } + } + + // Falls back to v1.2 + return '1.2'; + } + + /* + * @param \SimpleXMLElement|null $noteElement + * @param string|null $encoding + * + * @return array + */ + private function parseNotesMetadata(\SimpleXMLElement $noteElement = null, $encoding = null) + { + $notes = array(); + + if (null === $noteElement) { + return $notes; + } + + foreach ($noteElement as $xmlNote) { + $noteAttributes = $xmlNote->attributes(); + $note = array('content' => $this->utf8ToCharset((string) $xmlNote, $encoding)); + if (isset($noteAttributes['priority'])) { + $note['priority'] = (int) $noteAttributes['priority']; + } + + if (isset($noteAttributes['from'])) { + $note['from'] = (string) $noteAttributes['from']; + } + + $notes[] = $note; + } + + return $notes; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/YamlFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/YamlFileLoader.php new file mode 100644 index 0000000..5d9a3ad --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/YamlFileLoader.php @@ -0,0 +1,48 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Yaml\Parser as YamlParser; +use Symfony\Component\Yaml\Exception\ParseException; + +/** + * YamlFileLoader loads translations from Yaml files. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class YamlFileLoader extends FileLoader +{ + private $yamlParser; + + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + if (null === $this->yamlParser) { + if (!class_exists('Symfony\Component\Yaml\Parser')) { + throw new \LogicException('Loading translations from the YAML format requires the Symfony Yaml component.'); + } + + $this->yamlParser = new YamlParser(); + } + + try { + $messages = $this->yamlParser->parse(file_get_contents($resource)); + } catch (ParseException $e) { + throw new InvalidResourceException(sprintf('Error parsing YAML, invalid file "%s"', $resource), 0, $e); + } + + return $messages; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd new file mode 100644 index 0000000..3ce2a8e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd @@ -0,0 +1,2223 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +May-19-2004: +- Changed the <choice> for ElemType_header, moving minOccurs="0" maxOccurs="unbounded" from its elements +to <choice> itself. +- Added <choice> for ElemType_trans-unit to allow "any order" for <context-group>, <count-group>, <prop-group>, <note>, and +<alt-trans>. + +Oct-2005 +- updated version info to 1.2 +- equiv-trans attribute to <trans-unit> element +- merged-trans attribute for <group> element +- Add the <seg-source> element as optional in the <trans-unit> and <alt-trans> content models, at the same level as <source> +- Create a new value "seg" for the mtype attribute of the <mrk> element +- Add mid as an optional attribute for the <alt-trans> element + +Nov-14-2005 +- Changed name attribute for <context-group> from required to optional +- Added extension point at <xliff> + +Jan-9-2006 +- Added alttranstype type attribute to <alt-trans>, and values + +Jan-10-2006 +- Corrected error with overwritten purposeValueList +- Corrected name="AttrType_Version", attribute should have been "name" + +--> +<xsd:schema xmlns:xlf="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:oasis:names:tc:xliff:document:1.2" xml:lang="en"> + <!-- Import for xml:lang and xml:space --> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/> + <!-- Attributes Lists --> + <xsd:simpleType name="XTend"> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="x-[^\s]+"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="context-typeValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'context-type'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="database"> + <xsd:annotation> + <xsd:documentation>Indicates a database content.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="element"> + <xsd:annotation> + <xsd:documentation>Indicates the content of an element within an XML document.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="elementtitle"> + <xsd:annotation> + <xsd:documentation>Indicates the name of an element within an XML document.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="linenumber"> + <xsd:annotation> + <xsd:documentation>Indicates the line number from the sourcefile (see context-type="sourcefile") where the <source> is found.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="numparams"> + <xsd:annotation> + <xsd:documentation>Indicates a the number of parameters contained within the <source>.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="paramnotes"> + <xsd:annotation> + <xsd:documentation>Indicates notes pertaining to the parameters in the <source>.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="record"> + <xsd:annotation> + <xsd:documentation>Indicates the content of a record within a database.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="recordtitle"> + <xsd:annotation> + <xsd:documentation>Indicates the name of a record within a database.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="sourcefile"> + <xsd:annotation> + <xsd:documentation>Indicates the original source file in the case that multiple files are merged to form the original file from which the XLIFF file is created. This differs from the original <file> attribute in that this sourcefile is one of many that make up that file.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="count-typeValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'count-type'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="num-usages"> + <xsd:annotation> + <xsd:documentation>Indicates the count units are items that are used X times in a certain context; example: this is a reusable text unit which is used 42 times in other texts.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="repetition"> + <xsd:annotation> + <xsd:documentation>Indicates the count units are translation units existing already in the same document.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="total"> + <xsd:annotation> + <xsd:documentation>Indicates a total count.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="InlineDelimitersValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'ctype' when used other elements than <ph> or <x>.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="bold"> + <xsd:annotation> + <xsd:documentation>Indicates a run of bolded text.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="italic"> + <xsd:annotation> + <xsd:documentation>Indicates a run of text in italics.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="underlined"> + <xsd:annotation> + <xsd:documentation>Indicates a run of underlined text.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="link"> + <xsd:annotation> + <xsd:documentation>Indicates a run of hyper-text.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="InlinePlaceholdersValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'ctype' when used with <ph> or <x>.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="image"> + <xsd:annotation> + <xsd:documentation>Indicates a inline image.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="pb"> + <xsd:annotation> + <xsd:documentation>Indicates a page break.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="lb"> + <xsd:annotation> + <xsd:documentation>Indicates a line break.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="mime-typeValueList"> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="(text|multipart|message|application|image|audio|video|model)(/.+)*"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="datatypeValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'datatype'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="asp"> + <xsd:annotation> + <xsd:documentation>Indicates Active Server Page data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="c"> + <xsd:annotation> + <xsd:documentation>Indicates C source file data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="cdf"> + <xsd:annotation> + <xsd:documentation>Indicates Channel Definition Format (CDF) data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="cfm"> + <xsd:annotation> + <xsd:documentation>Indicates ColdFusion data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="cpp"> + <xsd:annotation> + <xsd:documentation>Indicates C++ source file data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="csharp"> + <xsd:annotation> + <xsd:documentation>Indicates C-Sharp data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="cstring"> + <xsd:annotation> + <xsd:documentation>Indicates strings from C, ASM, and driver files data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="csv"> + <xsd:annotation> + <xsd:documentation>Indicates comma-separated values data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="database"> + <xsd:annotation> + <xsd:documentation>Indicates database data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="documentfooter"> + <xsd:annotation> + <xsd:documentation>Indicates portions of document that follows data and contains metadata.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="documentheader"> + <xsd:annotation> + <xsd:documentation>Indicates portions of document that precedes data and contains metadata.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="filedialog"> + <xsd:annotation> + <xsd:documentation>Indicates data from standard UI file operations dialogs (e.g., Open, Save, Save As, Export, Import).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="form"> + <xsd:annotation> + <xsd:documentation>Indicates standard user input screen data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="html"> + <xsd:annotation> + <xsd:documentation>Indicates HyperText Markup Language (HTML) data - document instance.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="htmlbody"> + <xsd:annotation> + <xsd:documentation>Indicates content within an HTML document’s <body> element.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="ini"> + <xsd:annotation> + <xsd:documentation>Indicates Windows INI file data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="interleaf"> + <xsd:annotation> + <xsd:documentation>Indicates Interleaf data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="javaclass"> + <xsd:annotation> + <xsd:documentation>Indicates Java source file data (extension '.java').</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="javapropertyresourcebundle"> + <xsd:annotation> + <xsd:documentation>Indicates Java property resource bundle data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="javalistresourcebundle"> + <xsd:annotation> + <xsd:documentation>Indicates Java list resource bundle data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="javascript"> + <xsd:annotation> + <xsd:documentation>Indicates JavaScript source file data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="jscript"> + <xsd:annotation> + <xsd:documentation>Indicates JScript source file data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="layout"> + <xsd:annotation> + <xsd:documentation>Indicates information relating to formatting.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="lisp"> + <xsd:annotation> + <xsd:documentation>Indicates LISP source file data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="margin"> + <xsd:annotation> + <xsd:documentation>Indicates information relating to margin formats.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="menufile"> + <xsd:annotation> + <xsd:documentation>Indicates a file containing menu.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="messagefile"> + <xsd:annotation> + <xsd:documentation>Indicates numerically identified string table.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="mif"> + <xsd:annotation> + <xsd:documentation>Indicates Maker Interchange Format (MIF) data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="mimetype"> + <xsd:annotation> + <xsd:documentation>Indicates that the datatype attribute value is a MIME Type value and is defined in the mime-type attribute.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="mo"> + <xsd:annotation> + <xsd:documentation>Indicates GNU Machine Object data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="msglib"> + <xsd:annotation> + <xsd:documentation>Indicates Message Librarian strings created by Novell's Message Librarian Tool.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="pagefooter"> + <xsd:annotation> + <xsd:documentation>Indicates information to be displayed at the bottom of each page of a document.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="pageheader"> + <xsd:annotation> + <xsd:documentation>Indicates information to be displayed at the top of each page of a document.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="parameters"> + <xsd:annotation> + <xsd:documentation>Indicates a list of property values (e.g., settings within INI files or preferences dialog).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="pascal"> + <xsd:annotation> + <xsd:documentation>Indicates Pascal source file data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="php"> + <xsd:annotation> + <xsd:documentation>Indicates Hypertext Preprocessor data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="plaintext"> + <xsd:annotation> + <xsd:documentation>Indicates plain text file (no formatting other than, possibly, wrapping).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="po"> + <xsd:annotation> + <xsd:documentation>Indicates GNU Portable Object file.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="report"> + <xsd:annotation> + <xsd:documentation>Indicates dynamically generated user defined document. e.g. Oracle Report, Crystal Report, etc.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="resources"> + <xsd:annotation> + <xsd:documentation>Indicates Windows .NET binary resources.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="resx"> + <xsd:annotation> + <xsd:documentation>Indicates Windows .NET Resources.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="rtf"> + <xsd:annotation> + <xsd:documentation>Indicates Rich Text Format (RTF) data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="sgml"> + <xsd:annotation> + <xsd:documentation>Indicates Standard Generalized Markup Language (SGML) data - document instance.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="sgmldtd"> + <xsd:annotation> + <xsd:documentation>Indicates Standard Generalized Markup Language (SGML) data - Document Type Definition (DTD).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="svg"> + <xsd:annotation> + <xsd:documentation>Indicates Scalable Vector Graphic (SVG) data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="vbscript"> + <xsd:annotation> + <xsd:documentation>Indicates VisualBasic Script source file.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="warning"> + <xsd:annotation> + <xsd:documentation>Indicates warning message.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="winres"> + <xsd:annotation> + <xsd:documentation>Indicates Windows (Win32) resources (i.e. resources extracted from an RC script, a message file, or a compiled file).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="xhtml"> + <xsd:annotation> + <xsd:documentation>Indicates Extensible HyperText Markup Language (XHTML) data - document instance.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="xml"> + <xsd:annotation> + <xsd:documentation>Indicates Extensible Markup Language (XML) data - document instance.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="xmldtd"> + <xsd:annotation> + <xsd:documentation>Indicates Extensible Markup Language (XML) data - Document Type Definition (DTD).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="xsl"> + <xsd:annotation> + <xsd:documentation>Indicates Extensible Stylesheet Language (XSL) data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="xul"> + <xsd:annotation> + <xsd:documentation>Indicates XUL elements.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="mtypeValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'mtype'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="abbrev"> + <xsd:annotation> + <xsd:documentation>Indicates the marked text is an abbreviation.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="abbreviated-form"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.8: A term resulting from the omission of any part of the full term while designating the same concept.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="abbreviation"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.8.1: An abbreviated form of a simple term resulting from the omission of some of its letters (e.g. 'adj.' for 'adjective').</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="acronym"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.8.4: An abbreviated form of a term made up of letters from the full form of a multiword term strung together into a sequence pronounced only syllabically (e.g. 'radar' for 'radio detecting and ranging').</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="appellation"> + <xsd:annotation> + <xsd:documentation>ISO-12620: A proper-name term, such as the name of an agency or other proper entity.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="collocation"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.18.1: A recurrent word combination characterized by cohesion in that the components of the collocation must co-occur within an utterance or series of utterances, even though they do not necessarily have to maintain immediate proximity to one another.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="common-name"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.5: A synonym for an international scientific term that is used in general discourse in a given language.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="datetime"> + <xsd:annotation> + <xsd:documentation>Indicates the marked text is a date and/or time.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="equation"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.15: An expression used to represent a concept based on a statement that two mathematical expressions are, for instance, equal as identified by the equal sign (=), or assigned to one another by a similar sign.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="expanded-form"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.7: The complete representation of a term for which there is an abbreviated form.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="formula"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.14: Figures, symbols or the like used to express a concept briefly, such as a mathematical or chemical formula.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="head-term"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.1: The concept designation that has been chosen to head a terminological record.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="initialism"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.8.3: An abbreviated form of a term consisting of some of the initial letters of the words making up a multiword term or the term elements making up a compound term when these letters are pronounced individually (e.g. 'BSE' for 'bovine spongiform encephalopathy').</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="international-scientific-term"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.4: A term that is part of an international scientific nomenclature as adopted by an appropriate scientific body.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="internationalism"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.6: A term that has the same or nearly identical orthographic or phonemic form in many languages.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="logical-expression"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.16: An expression used to represent a concept based on mathematical or logical relations, such as statements of inequality, set relationships, Boolean operations, and the like.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="materials-management-unit"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.17: A unit to track object.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="name"> + <xsd:annotation> + <xsd:documentation>Indicates the marked text is a name.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="near-synonym"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.3: A term that represents the same or a very similar concept as another term in the same language, but for which interchangeability is limited to some contexts and inapplicable in others.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="part-number"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.17.2: A unique alphanumeric designation assigned to an object in a manufacturing system.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="phrase"> + <xsd:annotation> + <xsd:documentation>Indicates the marked text is a phrase.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="phraseological-unit"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.18: Any group of two or more words that form a unit, the meaning of which frequently cannot be deduced based on the combined sense of the words making up the phrase.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="protected"> + <xsd:annotation> + <xsd:documentation>Indicates the marked text should not be translated.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="romanized-form"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.12: A form of a term resulting from an operation whereby non-Latin writing systems are converted to the Latin alphabet.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="seg"> + <xsd:annotation> + <xsd:documentation>Indicates that the marked text represents a segment.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="set-phrase"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.18.2: A fixed, lexicalized phrase.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="short-form"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.8.2: A variant of a multiword term that includes fewer words than the full form of the term (e.g. 'Group of Twenty-four' for 'Intergovernmental Group of Twenty-four on International Monetary Affairs').</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="sku"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.17.1: Stock keeping unit, an inventory item identified by a unique alphanumeric designation assigned to an object in an inventory control system.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="standard-text"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.19: A fixed chunk of recurring text.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="symbol"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.13: A designation of a concept by letters, numerals, pictograms or any combination thereof.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="synonym"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.2: Any term that represents the same or a very similar concept as the main entry term in a term entry.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="synonymous-phrase"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.18.3: Phraseological unit in a language that expresses the same semantic content as another phrase in that same language.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="term"> + <xsd:annotation> + <xsd:documentation>Indicates the marked text is a term.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="transcribed-form"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.11: A form of a term resulting from an operation whereby the characters of one writing system are represented by characters from another writing system, taking into account the pronunciation of the characters converted.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="transliterated-form"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.10: A form of a term resulting from an operation whereby the characters of an alphabetic writing system are represented by characters from another alphabetic writing system.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="truncated-term"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.8.5: An abbreviated form of a term resulting from the omission of one or more term elements or syllables (e.g. 'flu' for 'influenza').</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="variant"> + <xsd:annotation> + <xsd:documentation>ISO-12620 2.1.9: One of the alternate forms of a term.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="restypeValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'restype'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="auto3state"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC AUTO3STATE control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="autocheckbox"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC AUTOCHECKBOX control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="autoradiobutton"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC AUTORADIOBUTTON control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="bedit"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC BEDIT control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="bitmap"> + <xsd:annotation> + <xsd:documentation>Indicates a bitmap, for example a BITMAP resource in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="button"> + <xsd:annotation> + <xsd:documentation>Indicates a button object, for example a BUTTON control Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="caption"> + <xsd:annotation> + <xsd:documentation>Indicates a caption, such as the caption of a dialog box.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="cell"> + <xsd:annotation> + <xsd:documentation>Indicates the cell in a table, for example the content of the <td> element in HTML.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="checkbox"> + <xsd:annotation> + <xsd:documentation>Indicates check box object, for example a CHECKBOX control in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="checkboxmenuitem"> + <xsd:annotation> + <xsd:documentation>Indicates a menu item with an associated checkbox.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="checkedlistbox"> + <xsd:annotation> + <xsd:documentation>Indicates a list box, but with a check-box for each item.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="colorchooser"> + <xsd:annotation> + <xsd:documentation>Indicates a color selection dialog.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="combobox"> + <xsd:annotation> + <xsd:documentation>Indicates a combination of edit box and listbox object, for example a COMBOBOX control in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="comboboxexitem"> + <xsd:annotation> + <xsd:documentation>Indicates an initialization entry of an extended combobox DLGINIT resource block. (code 0x1234).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="comboboxitem"> + <xsd:annotation> + <xsd:documentation>Indicates an initialization entry of a combobox DLGINIT resource block (code 0x0403).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="component"> + <xsd:annotation> + <xsd:documentation>Indicates a UI base class element that cannot be represented by any other element.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="contextmenu"> + <xsd:annotation> + <xsd:documentation>Indicates a context menu.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="ctext"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC CTEXT control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="cursor"> + <xsd:annotation> + <xsd:documentation>Indicates a cursor, for example a CURSOR resource in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="datetimepicker"> + <xsd:annotation> + <xsd:documentation>Indicates a date/time picker.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="defpushbutton"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC DEFPUSHBUTTON control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="dialog"> + <xsd:annotation> + <xsd:documentation>Indicates a dialog box.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="dlginit"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC DLGINIT resource block.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="edit"> + <xsd:annotation> + <xsd:documentation>Indicates an edit box object, for example an EDIT control in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="file"> + <xsd:annotation> + <xsd:documentation>Indicates a filename.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="filechooser"> + <xsd:annotation> + <xsd:documentation>Indicates a file dialog.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="fn"> + <xsd:annotation> + <xsd:documentation>Indicates a footnote.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="font"> + <xsd:annotation> + <xsd:documentation>Indicates a font name.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="footer"> + <xsd:annotation> + <xsd:documentation>Indicates a footer.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="frame"> + <xsd:annotation> + <xsd:documentation>Indicates a frame object.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="grid"> + <xsd:annotation> + <xsd:documentation>Indicates a XUL grid element.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="groupbox"> + <xsd:annotation> + <xsd:documentation>Indicates a groupbox object, for example a GROUPBOX control in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="header"> + <xsd:annotation> + <xsd:documentation>Indicates a header item.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="heading"> + <xsd:annotation> + <xsd:documentation>Indicates a heading, such has the content of <h1>, <h2>, etc. in HTML.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="hedit"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC HEDIT control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="hscrollbar"> + <xsd:annotation> + <xsd:documentation>Indicates a horizontal scrollbar.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="icon"> + <xsd:annotation> + <xsd:documentation>Indicates an icon, for example an ICON resource in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="iedit"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC IEDIT control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="keywords"> + <xsd:annotation> + <xsd:documentation>Indicates keyword list, such as the content of the Keywords meta-data in HTML, or a K footnote in WinHelp RTF.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="label"> + <xsd:annotation> + <xsd:documentation>Indicates a label object.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="linklabel"> + <xsd:annotation> + <xsd:documentation>Indicates a label that is also a HTML link (not necessarily a URL).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="list"> + <xsd:annotation> + <xsd:documentation>Indicates a list (a group of list-items, for example an <ol> or <ul> element in HTML).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="listbox"> + <xsd:annotation> + <xsd:documentation>Indicates a listbox object, for example an LISTBOX control in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="listitem"> + <xsd:annotation> + <xsd:documentation>Indicates an list item (an entry in a list).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="ltext"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC LTEXT control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="menu"> + <xsd:annotation> + <xsd:documentation>Indicates a menu (a group of menu-items).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="menubar"> + <xsd:annotation> + <xsd:documentation>Indicates a toolbar containing one or more tope level menus.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="menuitem"> + <xsd:annotation> + <xsd:documentation>Indicates a menu item (an entry in a menu).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="menuseparator"> + <xsd:annotation> + <xsd:documentation>Indicates a XUL menuseparator element.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="message"> + <xsd:annotation> + <xsd:documentation>Indicates a message, for example an entry in a MESSAGETABLE resource in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="monthcalendar"> + <xsd:annotation> + <xsd:documentation>Indicates a calendar control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="numericupdown"> + <xsd:annotation> + <xsd:documentation>Indicates an edit box beside a spin control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="panel"> + <xsd:annotation> + <xsd:documentation>Indicates a catch all for rectangular areas.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="popupmenu"> + <xsd:annotation> + <xsd:documentation>Indicates a standalone menu not necessarily associated with a menubar.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="pushbox"> + <xsd:annotation> + <xsd:documentation>Indicates a pushbox object, for example a PUSHBOX control in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="pushbutton"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC PUSHBUTTON control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="radio"> + <xsd:annotation> + <xsd:documentation>Indicates a radio button object.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="radiobuttonmenuitem"> + <xsd:annotation> + <xsd:documentation>Indicates a menuitem with associated radio button.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="rcdata"> + <xsd:annotation> + <xsd:documentation>Indicates raw data resources for an application.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="row"> + <xsd:annotation> + <xsd:documentation>Indicates a row in a table.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="rtext"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC RTEXT control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="scrollpane"> + <xsd:annotation> + <xsd:documentation>Indicates a user navigable container used to show a portion of a document.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="separator"> + <xsd:annotation> + <xsd:documentation>Indicates a generic divider object (e.g. menu group separator).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="shortcut"> + <xsd:annotation> + <xsd:documentation>Windows accelerators, shortcuts in resource or property files.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="spinner"> + <xsd:annotation> + <xsd:documentation>Indicates a UI control to indicate process activity but not progress.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="splitter"> + <xsd:annotation> + <xsd:documentation>Indicates a splitter bar.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="state3"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC STATE3 control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="statusbar"> + <xsd:annotation> + <xsd:documentation>Indicates a window for providing feedback to the users, like 'read-only', etc.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="string"> + <xsd:annotation> + <xsd:documentation>Indicates a string, for example an entry in a STRINGTABLE resource in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="tabcontrol"> + <xsd:annotation> + <xsd:documentation>Indicates a layers of controls with a tab to select layers.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="table"> + <xsd:annotation> + <xsd:documentation>Indicates a display and edits regular two-dimensional tables of cells.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="textbox"> + <xsd:annotation> + <xsd:documentation>Indicates a XUL textbox element.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="togglebutton"> + <xsd:annotation> + <xsd:documentation>Indicates a UI button that can be toggled to on or off state.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="toolbar"> + <xsd:annotation> + <xsd:documentation>Indicates an array of controls, usually buttons.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="tooltip"> + <xsd:annotation> + <xsd:documentation>Indicates a pop up tool tip text.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="trackbar"> + <xsd:annotation> + <xsd:documentation>Indicates a bar with a pointer indicating a position within a certain range.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="tree"> + <xsd:annotation> + <xsd:documentation>Indicates a control that displays a set of hierarchical data.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="uri"> + <xsd:annotation> + <xsd:documentation>Indicates a URI (URN or URL).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="userbutton"> + <xsd:annotation> + <xsd:documentation>Indicates a Windows RC USERBUTTON control.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="usercontrol"> + <xsd:annotation> + <xsd:documentation>Indicates a user-defined control like CONTROL control in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="var"> + <xsd:annotation> + <xsd:documentation>Indicates the text of a variable.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="versioninfo"> + <xsd:annotation> + <xsd:documentation>Indicates version information about a resource like VERSIONINFO in Windows.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="vscrollbar"> + <xsd:annotation> + <xsd:documentation>Indicates a vertical scrollbar.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="window"> + <xsd:annotation> + <xsd:documentation>Indicates a graphical window.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="size-unitValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'size-unit'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="byte"> + <xsd:annotation> + <xsd:documentation>Indicates a size in 8-bit bytes.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="char"> + <xsd:annotation> + <xsd:documentation>Indicates a size in Unicode characters.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="col"> + <xsd:annotation> + <xsd:documentation>Indicates a size in columns. Used for HTML text area.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="cm"> + <xsd:annotation> + <xsd:documentation>Indicates a size in centimeters.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="dlgunit"> + <xsd:annotation> + <xsd:documentation>Indicates a size in dialog units, as defined in Windows resources.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="em"> + <xsd:annotation> + <xsd:documentation>Indicates a size in 'font-size' units (as defined in CSS).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="ex"> + <xsd:annotation> + <xsd:documentation>Indicates a size in 'x-height' units (as defined in CSS).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="glyph"> + <xsd:annotation> + <xsd:documentation>Indicates a size in glyphs. A glyph is considered to be one or more combined Unicode characters that represent a single displayable text character. Sometimes referred to as a 'grapheme cluster'</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="in"> + <xsd:annotation> + <xsd:documentation>Indicates a size in inches.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="mm"> + <xsd:annotation> + <xsd:documentation>Indicates a size in millimeters.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="percent"> + <xsd:annotation> + <xsd:documentation>Indicates a size in percentage.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="pixel"> + <xsd:annotation> + <xsd:documentation>Indicates a size in pixels.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="point"> + <xsd:annotation> + <xsd:documentation>Indicates a size in point.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="row"> + <xsd:annotation> + <xsd:documentation>Indicates a size in rows. Used for HTML text area.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="stateValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'state'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="final"> + <xsd:annotation> + <xsd:documentation>Indicates the terminating state.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="needs-adaptation"> + <xsd:annotation> + <xsd:documentation>Indicates only non-textual information needs adaptation.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="needs-l10n"> + <xsd:annotation> + <xsd:documentation>Indicates both text and non-textual information needs adaptation.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="needs-review-adaptation"> + <xsd:annotation> + <xsd:documentation>Indicates only non-textual information needs review.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="needs-review-l10n"> + <xsd:annotation> + <xsd:documentation>Indicates both text and non-textual information needs review.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="needs-review-translation"> + <xsd:annotation> + <xsd:documentation>Indicates that only the text of the item needs to be reviewed.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="needs-translation"> + <xsd:annotation> + <xsd:documentation>Indicates that the item needs to be translated.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="new"> + <xsd:annotation> + <xsd:documentation>Indicates that the item is new. For example, translation units that were not in a previous version of the document.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="signed-off"> + <xsd:annotation> + <xsd:documentation>Indicates that changes are reviewed and approved.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="translated"> + <xsd:annotation> + <xsd:documentation>Indicates that the item has been translated.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="state-qualifierValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'state-qualifier'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="exact-match"> + <xsd:annotation> + <xsd:documentation>Indicates an exact match. An exact match occurs when a source text of a segment is exactly the same as the source text of a segment that was translated previously.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="fuzzy-match"> + <xsd:annotation> + <xsd:documentation>Indicates a fuzzy match. A fuzzy match occurs when a source text of a segment is very similar to the source text of a segment that was translated previously (e.g. when the difference is casing, a few changed words, white-space discripancy, etc.).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="id-match"> + <xsd:annotation> + <xsd:documentation>Indicates a match based on matching IDs (in addition to matching text).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="leveraged-glossary"> + <xsd:annotation> + <xsd:documentation>Indicates a translation derived from a glossary.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="leveraged-inherited"> + <xsd:annotation> + <xsd:documentation>Indicates a translation derived from existing translation.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="leveraged-mt"> + <xsd:annotation> + <xsd:documentation>Indicates a translation derived from machine translation.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="leveraged-repository"> + <xsd:annotation> + <xsd:documentation>Indicates a translation derived from a translation repository.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="leveraged-tm"> + <xsd:annotation> + <xsd:documentation>Indicates a translation derived from a translation memory.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="mt-suggestion"> + <xsd:annotation> + <xsd:documentation>Indicates the translation is suggested by machine translation.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="rejected-grammar"> + <xsd:annotation> + <xsd:documentation>Indicates that the item has been rejected because of incorrect grammar.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="rejected-inaccurate"> + <xsd:annotation> + <xsd:documentation>Indicates that the item has been rejected because it is incorrect.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="rejected-length"> + <xsd:annotation> + <xsd:documentation>Indicates that the item has been rejected because it is too long or too short.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="rejected-spelling"> + <xsd:annotation> + <xsd:documentation>Indicates that the item has been rejected because of incorrect spelling.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="tm-suggestion"> + <xsd:annotation> + <xsd:documentation>Indicates the translation is suggested by translation memory.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="unitValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'unit'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="word"> + <xsd:annotation> + <xsd:documentation>Refers to words.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="page"> + <xsd:annotation> + <xsd:documentation>Refers to pages.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="trans-unit"> + <xsd:annotation> + <xsd:documentation>Refers to <trans-unit> elements.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="bin-unit"> + <xsd:annotation> + <xsd:documentation>Refers to <bin-unit> elements.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="glyph"> + <xsd:annotation> + <xsd:documentation>Refers to glyphs.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="item"> + <xsd:annotation> + <xsd:documentation>Refers to <trans-unit> and/or <bin-unit> elements.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="instance"> + <xsd:annotation> + <xsd:documentation>Refers to the occurrences of instances defined by the count-type value.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="character"> + <xsd:annotation> + <xsd:documentation>Refers to characters.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="line"> + <xsd:annotation> + <xsd:documentation>Refers to lines.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="sentence"> + <xsd:annotation> + <xsd:documentation>Refers to sentences.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="paragraph"> + <xsd:annotation> + <xsd:documentation>Refers to paragraphs.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="segment"> + <xsd:annotation> + <xsd:documentation>Refers to segments.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="placeable"> + <xsd:annotation> + <xsd:documentation>Refers to placeables (inline elements).</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="priorityValueList"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'priority'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:positiveInteger"> + <xsd:enumeration value="1"> + <xsd:annotation> + <xsd:documentation>Highest priority.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="2"> + <xsd:annotation> + <xsd:documentation>High priority.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="3"> + <xsd:annotation> + <xsd:documentation>High priority, but not as important as 2.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="4"> + <xsd:annotation> + <xsd:documentation>High priority, but not as important as 3.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="5"> + <xsd:annotation> + <xsd:documentation>Medium priority, but more important than 6.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="6"> + <xsd:annotation> + <xsd:documentation>Medium priority, but less important than 5.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="7"> + <xsd:annotation> + <xsd:documentation>Low priority, but more important than 8.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="8"> + <xsd:annotation> + <xsd:documentation>Low priority, but more important than 9.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="9"> + <xsd:annotation> + <xsd:documentation>Low priority.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="10"> + <xsd:annotation> + <xsd:documentation>Lowest priority.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="reformatValueYesNo"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="yes"> + <xsd:annotation> + <xsd:documentation>This value indicates that all properties can be reformatted. This value must be used alone.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="no"> + <xsd:annotation> + <xsd:documentation>This value indicates that no properties should be reformatted. This value must be used alone.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="reformatValueList"> + <xsd:list> + <xsd:simpleType> + <xsd:union memberTypes="xlf:XTend"> + <xsd:simpleType> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="coord"> + <xsd:annotation> + <xsd:documentation>This value indicates that all information in the coord attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="coord-x"> + <xsd:annotation> + <xsd:documentation>This value indicates that the x information in the coord attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="coord-y"> + <xsd:annotation> + <xsd:documentation>This value indicates that the y information in the coord attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="coord-cx"> + <xsd:annotation> + <xsd:documentation>This value indicates that the cx information in the coord attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="coord-cy"> + <xsd:annotation> + <xsd:documentation>This value indicates that the cy information in the coord attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="font"> + <xsd:annotation> + <xsd:documentation>This value indicates that all the information in the font attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="font-name"> + <xsd:annotation> + <xsd:documentation>This value indicates that the name information in the font attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="font-size"> + <xsd:annotation> + <xsd:documentation>This value indicates that the size information in the font attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="font-weight"> + <xsd:annotation> + <xsd:documentation>This value indicates that the weight information in the font attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="css-style"> + <xsd:annotation> + <xsd:documentation>This value indicates that the information in the css-style attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="style"> + <xsd:annotation> + <xsd:documentation>This value indicates that the information in the style attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="ex-style"> + <xsd:annotation> + <xsd:documentation>This value indicates that the information in the exstyle attribute can be modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + </xsd:list> + </xsd:simpleType> + <xsd:simpleType name="purposeValueList"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="information"> + <xsd:annotation> + <xsd:documentation>Indicates that the context is informational in nature, specifying for example, how a term should be translated. Thus, should be displayed to anyone editing the XLIFF document.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="location"> + <xsd:annotation> + <xsd:documentation>Indicates that the context-group is used to specify where the term was found in the translatable source. Thus, it is not displayed.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="match"> + <xsd:annotation> + <xsd:documentation>Indicates that the context information should be used during translation memory lookups. Thus, it is not displayed.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="alttranstypeValueList"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="proposal"> + <xsd:annotation> + <xsd:documentation>Represents a translation proposal from a translation memory or other resource.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="previous-version"> + <xsd:annotation> + <xsd:documentation>Represents a previous version of the target element.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="rejected"> + <xsd:annotation> + <xsd:documentation>Represents a rejected version of the target element.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="reference"> + <xsd:annotation> + <xsd:documentation>Represents a translation to be used for reference purposes only, for example from a related product or a different language.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="accepted"> + <xsd:annotation> + <xsd:documentation>Represents a proposed translation that was used for the translation of the trans-unit, possibly modified.</xsd:documentation> + </xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + <!-- Other Types --> + <xsd:complexType name="ElemType_ExternalReference"> + <xsd:choice> + <xsd:element ref="xlf:internal-file"/> + <xsd:element ref="xlf:external-file"/> + </xsd:choice> + </xsd:complexType> + <xsd:simpleType name="AttrType_purpose"> + <xsd:list> + <xsd:simpleType> + <xsd:union memberTypes="xlf:purposeValueList xlf:XTend"/> + </xsd:simpleType> + </xsd:list> + </xsd:simpleType> + <xsd:simpleType name="AttrType_datatype"> + <xsd:union memberTypes="xlf:datatypeValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_restype"> + <xsd:union memberTypes="xlf:restypeValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_alttranstype"> + <xsd:union memberTypes="xlf:alttranstypeValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_context-type"> + <xsd:union memberTypes="xlf:context-typeValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_state"> + <xsd:union memberTypes="xlf:stateValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_state-qualifier"> + <xsd:union memberTypes="xlf:state-qualifierValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_count-type"> + <xsd:union memberTypes="xlf:restypeValueList xlf:count-typeValueList xlf:datatypeValueList xlf:stateValueList xlf:state-qualifierValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_InlineDelimiters"> + <xsd:union memberTypes="xlf:InlineDelimitersValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_InlinePlaceholders"> + <xsd:union memberTypes="xlf:InlinePlaceholdersValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_size-unit"> + <xsd:union memberTypes="xlf:size-unitValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_mtype"> + <xsd:union memberTypes="xlf:mtypeValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_unit"> + <xsd:union memberTypes="xlf:unitValueList xlf:XTend"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_priority"> + <xsd:union memberTypes="xlf:priorityValueList"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_reformat"> + <xsd:union memberTypes="xlf:reformatValueYesNo xlf:reformatValueList"/> + </xsd:simpleType> + <xsd:simpleType name="AttrType_YesNo"> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="yes"/> + <xsd:enumeration value="no"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="AttrType_Position"> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="open"/> + <xsd:enumeration value="close"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="AttrType_assoc"> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="preceding"/> + <xsd:enumeration value="following"/> + <xsd:enumeration value="both"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="AttrType_annotates"> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="source"/> + <xsd:enumeration value="target"/> + <xsd:enumeration value="general"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="AttrType_Coordinates"> + <xsd:annotation> + <xsd:documentation>Values for the attribute 'coord'.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="(-?\d+|#);(-?\d+|#);(-?\d+|#);(-?\d+|#)"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="AttrType_Version"> + <xsd:annotation> + <xsd:documentation>Version values: 1.0 and 1.1 are allowed for backward compatibility.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="1.2"/> + <xsd:enumeration value="1.1"/> + <xsd:enumeration value="1.0"/> + </xsd:restriction> + </xsd:simpleType> + <!-- Groups --> + <xsd:group name="ElemGroup_TextContent"> + <xsd:choice> + <xsd:element ref="xlf:g"/> + <xsd:element ref="xlf:bpt"/> + <xsd:element ref="xlf:ept"/> + <xsd:element ref="xlf:ph"/> + <xsd:element ref="xlf:it"/> + <xsd:element ref="xlf:mrk"/> + <xsd:element ref="xlf:x"/> + <xsd:element ref="xlf:bx"/> + <xsd:element ref="xlf:ex"/> + </xsd:choice> + </xsd:group> + <xsd:attributeGroup name="AttrGroup_TextContent"> + <xsd:attribute name="id" type="xsd:string" use="required"/> + <xsd:attribute name="xid" type="xsd:string" use="optional"/> + <xsd:attribute name="equiv-text" type="xsd:string" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:attributeGroup> + <!-- XLIFF Structure --> + <xsd:element name="xliff"> + <xsd:complexType> + <xsd:sequence maxOccurs="unbounded"> + <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> + <xsd:element ref="xlf:file"/> + </xsd:sequence> + <xsd:attribute name="version" type="xlf:AttrType_Version" use="required"/> + <xsd:attribute ref="xml:lang" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="file"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" ref="xlf:header"/> + <xsd:element ref="xlf:body"/> + </xsd:sequence> + <xsd:attribute name="original" type="xsd:string" use="required"/> + <xsd:attribute name="source-language" type="xsd:language" use="required"/> + <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="required"/> + <xsd:attribute name="tool-id" type="xsd:string" use="optional"/> + <xsd:attribute name="date" type="xsd:dateTime" use="optional"/> + <xsd:attribute ref="xml:space" use="optional"/> + <xsd:attribute name="category" type="xsd:string" use="optional"/> + <xsd:attribute name="target-language" type="xsd:language" use="optional"/> + <xsd:attribute name="product-name" type="xsd:string" use="optional"/> + <xsd:attribute name="product-version" type="xsd:string" use="optional"/> + <xsd:attribute name="build-num" type="xsd:string" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + <xsd:unique name="U_group_id"> + <xsd:selector xpath=".//xlf:group"/> + <xsd:field xpath="@id"/> + </xsd:unique> + <xsd:key name="K_unit_id"> + <xsd:selector xpath=".//xlf:trans-unit|.//xlf:bin-unit"/> + <xsd:field xpath="@id"/> + </xsd:key> + <xsd:keyref name="KR_unit_id" refer="xlf:K_unit_id"> + <xsd:selector xpath=".//bpt|.//ept|.//it|.//ph|.//g|.//x|.//bx|.//ex|.//sub"/> + <xsd:field xpath="@xid"/> + </xsd:keyref> + <xsd:key name="K_tool-id"> + <xsd:selector xpath="xlf:header/xlf:tool"/> + <xsd:field xpath="@tool-id"/> + </xsd:key> + <xsd:keyref name="KR_file_tool-id" refer="xlf:K_tool-id"> + <xsd:selector xpath="."/> + <xsd:field xpath="@tool-id"/> + </xsd:keyref> + <xsd:keyref name="KR_phase_tool-id" refer="xlf:K_tool-id"> + <xsd:selector xpath="xlf:header/xlf:phase-group/xlf:phase"/> + <xsd:field xpath="@tool-id"/> + </xsd:keyref> + <xsd:keyref name="KR_alt-trans_tool-id" refer="xlf:K_tool-id"> + <xsd:selector xpath=".//xlf:trans-unit/xlf:alt-trans"/> + <xsd:field xpath="@tool-id"/> + </xsd:keyref> + <xsd:key name="K_count-group_name"> + <xsd:selector xpath=".//xlf:count-group"/> + <xsd:field xpath="@name"/> + </xsd:key> + <xsd:unique name="U_context-group_name"> + <xsd:selector xpath=".//xlf:context-group"/> + <xsd:field xpath="@name"/> + </xsd:unique> + <xsd:key name="K_phase-name"> + <xsd:selector xpath="xlf:header/xlf:phase-group/xlf:phase"/> + <xsd:field xpath="@phase-name"/> + </xsd:key> + <xsd:keyref name="KR_phase-name" refer="xlf:K_phase-name"> + <xsd:selector xpath=".//xlf:count|.//xlf:trans-unit|.//xlf:target|.//bin-unit|.//bin-target"/> + <xsd:field xpath="@phase-name"/> + </xsd:keyref> + <xsd:unique name="U_uid"> + <xsd:selector xpath=".//xlf:external-file"/> + <xsd:field xpath="@uid"/> + </xsd:unique> + </xsd:element> + <xsd:element name="header"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" name="skl" type="xlf:ElemType_ExternalReference"/> + <xsd:element minOccurs="0" ref="xlf:phase-group"/> + <xsd:choice maxOccurs="unbounded" minOccurs="0"> + <xsd:element name="glossary" type="xlf:ElemType_ExternalReference"/> + <xsd:element name="reference" type="xlf:ElemType_ExternalReference"/> + <xsd:element ref="xlf:count-group"/> + <xsd:element ref="xlf:note"/> + <xsd:element ref="xlf:tool"/> + </xsd:choice> + <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="internal-file"> + <xsd:complexType> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="form" type="xsd:string"/> + <xsd:attribute name="crc" type="xsd:NMTOKEN"/> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + </xsd:element> + <xsd:element name="external-file"> + <xsd:complexType> + <xsd:attribute name="href" type="xsd:string" use="required"/> + <xsd:attribute name="crc" type="xsd:NMTOKEN"/> + <xsd:attribute name="uid" type="xsd:NMTOKEN"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="note"> + <xsd:complexType> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute ref="xml:lang" use="optional"/> + <xsd:attribute default="1" name="priority" type="xlf:AttrType_priority" use="optional"/> + <xsd:attribute name="from" type="xsd:string" use="optional"/> + <xsd:attribute default="general" name="annotates" type="xlf:AttrType_annotates" use="optional"/> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + </xsd:element> + <xsd:element name="phase-group"> + <xsd:complexType> + <xsd:sequence maxOccurs="unbounded"> + <xsd:element ref="xlf:phase"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="phase"> + <xsd:complexType> + <xsd:sequence maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="xlf:note"/> + </xsd:sequence> + <xsd:attribute name="phase-name" type="xsd:string" use="required"/> + <xsd:attribute name="process-name" type="xsd:string" use="required"/> + <xsd:attribute name="company-name" type="xsd:string" use="optional"/> + <xsd:attribute name="tool-id" type="xsd:string" use="optional"/> + <xsd:attribute name="date" type="xsd:dateTime" use="optional"/> + <xsd:attribute name="job-id" type="xsd:string" use="optional"/> + <xsd:attribute name="contact-name" type="xsd:string" use="optional"/> + <xsd:attribute name="contact-email" type="xsd:string" use="optional"/> + <xsd:attribute name="contact-phone" type="xsd:string" use="optional"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="count-group"> + <xsd:complexType> + <xsd:sequence maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="xlf:count"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="count"> + <xsd:complexType> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="count-type" type="xlf:AttrType_count-type" use="optional"/> + <xsd:attribute name="phase-name" type="xsd:string" use="optional"/> + <xsd:attribute default="word" name="unit" type="xlf:AttrType_unit" use="optional"/> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + </xsd:element> + <xsd:element name="context-group"> + <xsd:complexType> + <xsd:sequence maxOccurs="unbounded"> + <xsd:element ref="xlf:context"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="optional"/> + <xsd:attribute name="crc" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="purpose" type="xlf:AttrType_purpose" use="optional"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="context"> + <xsd:complexType> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="context-type" type="xlf:AttrType_context-type" use="required"/> + <xsd:attribute default="no" name="match-mandatory" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:attribute name="crc" type="xsd:NMTOKEN" use="optional"/> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + </xsd:element> + <xsd:element name="tool"> + <xsd:complexType mixed="true"> + <xsd:sequence> + <xsd:any namespace="##any" processContents="strict" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="tool-id" type="xsd:string" use="required"/> + <xsd:attribute name="tool-name" type="xsd:string" use="required"/> + <xsd:attribute name="tool-version" type="xsd:string" use="optional"/> + <xsd:attribute name="tool-company" type="xsd:string" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="body"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded" minOccurs="0"> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:group"/> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:trans-unit"/> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:bin-unit"/> + </xsd:choice> + </xsd:complexType> + </xsd:element> + <xsd:element name="group"> + <xsd:complexType> + <xsd:sequence> + <xsd:sequence> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:context-group"/> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:count-group"/> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:note"/> + <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> + </xsd:sequence> + <xsd:choice maxOccurs="unbounded"> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:group"/> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:trans-unit"/> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:bin-unit"/> + </xsd:choice> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:string" use="optional"/> + <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="optional"/> + <xsd:attribute default="default" ref="xml:space" use="optional"/> + <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> + <xsd:attribute name="resname" type="xsd:string" use="optional"/> + <xsd:attribute name="extradata" type="xsd:string" use="optional"/> + <xsd:attribute name="extype" type="xsd:string" use="optional"/> + <xsd:attribute name="help-id" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="menu" type="xsd:string" use="optional"/> + <xsd:attribute name="menu-option" type="xsd:string" use="optional"/> + <xsd:attribute name="menu-name" type="xsd:string" use="optional"/> + <xsd:attribute name="coord" type="xlf:AttrType_Coordinates" use="optional"/> + <xsd:attribute name="font" type="xsd:string" use="optional"/> + <xsd:attribute name="css-style" type="xsd:string" use="optional"/> + <xsd:attribute name="style" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="exstyle" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute default="yes" name="translate" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:attribute default="yes" name="reformat" type="xlf:AttrType_reformat" use="optional"/> + <xsd:attribute default="pixel" name="size-unit" type="xlf:AttrType_size-unit" use="optional"/> + <xsd:attribute name="maxwidth" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="minwidth" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="maxheight" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="minheight" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="maxbytes" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="minbytes" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="charclass" type="xsd:string" use="optional"/> + <xsd:attribute default="no" name="merged-trans" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="trans-unit"> + <xsd:complexType> + <xsd:sequence> + <xsd:element ref="xlf:source"/> + <xsd:element minOccurs="0" ref="xlf:seg-source"/> + <xsd:element minOccurs="0" ref="xlf:target"/> + <xsd:choice maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="xlf:context-group"/> + <xsd:element ref="xlf:count-group"/> + <xsd:element ref="xlf:note"/> + <xsd:element ref="xlf:alt-trans"/> + </xsd:choice> + <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:string" use="required"/> + <xsd:attribute name="approved" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:attribute default="yes" name="translate" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:attribute default="yes" name="reformat" type="xlf:AttrType_reformat" use="optional"/> + <xsd:attribute default="default" ref="xml:space" use="optional"/> + <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="optional"/> + <xsd:attribute name="phase-name" type="xsd:string" use="optional"/> + <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> + <xsd:attribute name="resname" type="xsd:string" use="optional"/> + <xsd:attribute name="extradata" type="xsd:string" use="optional"/> + <xsd:attribute name="extype" type="xsd:string" use="optional"/> + <xsd:attribute name="help-id" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="menu" type="xsd:string" use="optional"/> + <xsd:attribute name="menu-option" type="xsd:string" use="optional"/> + <xsd:attribute name="menu-name" type="xsd:string" use="optional"/> + <xsd:attribute name="coord" type="xlf:AttrType_Coordinates" use="optional"/> + <xsd:attribute name="font" type="xsd:string" use="optional"/> + <xsd:attribute name="css-style" type="xsd:string" use="optional"/> + <xsd:attribute name="style" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="exstyle" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute default="pixel" name="size-unit" type="xlf:AttrType_size-unit" use="optional"/> + <xsd:attribute name="maxwidth" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="minwidth" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="maxheight" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="minheight" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="maxbytes" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="minbytes" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="charclass" type="xsd:string" use="optional"/> + <xsd:attribute default="yes" name="merged-trans" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + <xsd:unique name="U_tu_segsrc_mid"> + <xsd:selector xpath="./xlf:seg-source/xlf:mrk"/> + <xsd:field xpath="@mid"/> + </xsd:unique> + <xsd:keyref name="KR_tu_segsrc_mid" refer="xlf:U_tu_segsrc_mid"> + <xsd:selector xpath="./xlf:target/xlf:mrk|./xlf:alt-trans"/> + <xsd:field xpath="@mid"/> + </xsd:keyref> + </xsd:element> + <xsd:element name="source"> + <xsd:complexType mixed="true"> + <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> + <xsd:attribute ref="xml:lang" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + <xsd:unique name="U_source_bpt_rid"> + <xsd:selector xpath=".//xlf:bpt"/> + <xsd:field xpath="@rid"/> + </xsd:unique> + <xsd:keyref name="KR_source_ept_rid" refer="xlf:U_source_bpt_rid"> + <xsd:selector xpath=".//xlf:ept"/> + <xsd:field xpath="@rid"/> + </xsd:keyref> + <xsd:unique name="U_source_bx_rid"> + <xsd:selector xpath=".//xlf:bx"/> + <xsd:field xpath="@rid"/> + </xsd:unique> + <xsd:keyref name="KR_source_ex_rid" refer="xlf:U_source_bx_rid"> + <xsd:selector xpath=".//xlf:ex"/> + <xsd:field xpath="@rid"/> + </xsd:keyref> + </xsd:element> + <xsd:element name="seg-source"> + <xsd:complexType mixed="true"> + <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> + <xsd:attribute ref="xml:lang" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + <xsd:unique name="U_segsrc_bpt_rid"> + <xsd:selector xpath=".//xlf:bpt"/> + <xsd:field xpath="@rid"/> + </xsd:unique> + <xsd:keyref name="KR_segsrc_ept_rid" refer="xlf:U_segsrc_bpt_rid"> + <xsd:selector xpath=".//xlf:ept"/> + <xsd:field xpath="@rid"/> + </xsd:keyref> + <xsd:unique name="U_segsrc_bx_rid"> + <xsd:selector xpath=".//xlf:bx"/> + <xsd:field xpath="@rid"/> + </xsd:unique> + <xsd:keyref name="KR_segsrc_ex_rid" refer="xlf:U_segsrc_bx_rid"> + <xsd:selector xpath=".//xlf:ex"/> + <xsd:field xpath="@rid"/> + </xsd:keyref> + </xsd:element> + <xsd:element name="target"> + <xsd:complexType mixed="true"> + <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> + <xsd:attribute name="state" type="xlf:AttrType_state" use="optional"/> + <xsd:attribute name="state-qualifier" type="xlf:AttrType_state-qualifier" use="optional"/> + <xsd:attribute name="phase-name" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute ref="xml:lang" use="optional"/> + <xsd:attribute name="resname" type="xsd:string" use="optional"/> + <xsd:attribute name="coord" type="xlf:AttrType_Coordinates" use="optional"/> + <xsd:attribute name="font" type="xsd:string" use="optional"/> + <xsd:attribute name="css-style" type="xsd:string" use="optional"/> + <xsd:attribute name="style" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="exstyle" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute default="yes" name="equiv-trans" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + <xsd:unique name="U_target_bpt_rid"> + <xsd:selector xpath=".//xlf:bpt"/> + <xsd:field xpath="@rid"/> + </xsd:unique> + <xsd:keyref name="KR_target_ept_rid" refer="xlf:U_target_bpt_rid"> + <xsd:selector xpath=".//xlf:ept"/> + <xsd:field xpath="@rid"/> + </xsd:keyref> + <xsd:unique name="U_target_bx_rid"> + <xsd:selector xpath=".//xlf:bx"/> + <xsd:field xpath="@rid"/> + </xsd:unique> + <xsd:keyref name="KR_target_ex_rid" refer="xlf:U_target_bx_rid"> + <xsd:selector xpath=".//xlf:ex"/> + <xsd:field xpath="@rid"/> + </xsd:keyref> + </xsd:element> + <xsd:element name="alt-trans"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" ref="xlf:source"/> + <xsd:element minOccurs="0" ref="xlf:seg-source"/> + <xsd:element maxOccurs="1" ref="xlf:target"/> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:context-group"/> + <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:note"/> + <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> + </xsd:sequence> + <xsd:attribute name="match-quality" type="xsd:string" use="optional"/> + <xsd:attribute name="tool-id" type="xsd:string" use="optional"/> + <xsd:attribute name="crc" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute ref="xml:lang" use="optional"/> + <xsd:attribute name="origin" type="xsd:string" use="optional"/> + <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="optional"/> + <xsd:attribute default="default" ref="xml:space" use="optional"/> + <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> + <xsd:attribute name="resname" type="xsd:string" use="optional"/> + <xsd:attribute name="extradata" type="xsd:string" use="optional"/> + <xsd:attribute name="extype" type="xsd:string" use="optional"/> + <xsd:attribute name="help-id" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="menu" type="xsd:string" use="optional"/> + <xsd:attribute name="menu-option" type="xsd:string" use="optional"/> + <xsd:attribute name="menu-name" type="xsd:string" use="optional"/> + <xsd:attribute name="mid" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="coord" type="xlf:AttrType_Coordinates" use="optional"/> + <xsd:attribute name="font" type="xsd:string" use="optional"/> + <xsd:attribute name="css-style" type="xsd:string" use="optional"/> + <xsd:attribute name="style" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="exstyle" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="phase-name" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute default="proposal" name="alttranstype" type="xlf:AttrType_alttranstype" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + <xsd:unique name="U_at_segsrc_mid"> + <xsd:selector xpath="./xlf:seg-source/xlf:mrk"/> + <xsd:field xpath="@mid"/> + </xsd:unique> + <xsd:keyref name="KR_at_segsrc_mid" refer="xlf:U_at_segsrc_mid"> + <xsd:selector xpath="./xlf:target/xlf:mrk"/> + <xsd:field xpath="@mid"/> + </xsd:keyref> + </xsd:element> + <xsd:element name="bin-unit"> + <xsd:complexType> + <xsd:sequence> + <xsd:element ref="xlf:bin-source"/> + <xsd:element minOccurs="0" ref="xlf:bin-target"/> + <xsd:choice maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="xlf:context-group"/> + <xsd:element ref="xlf:count-group"/> + <xsd:element ref="xlf:note"/> + <xsd:element ref="xlf:trans-unit"/> + </xsd:choice> + <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:string" use="required"/> + <xsd:attribute name="mime-type" type="xlf:mime-typeValueList" use="required"/> + <xsd:attribute name="approved" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:attribute default="yes" name="translate" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:attribute default="yes" name="reformat" type="xlf:AttrType_reformat" use="optional"/> + <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> + <xsd:attribute name="resname" type="xsd:string" use="optional"/> + <xsd:attribute name="phase-name" type="xsd:string" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="bin-source"> + <xsd:complexType> + <xsd:choice> + <xsd:element ref="xlf:internal-file"/> + <xsd:element ref="xlf:external-file"/> + </xsd:choice> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="bin-target"> + <xsd:complexType> + <xsd:choice> + <xsd:element ref="xlf:internal-file"/> + <xsd:element ref="xlf:external-file"/> + </xsd:choice> + <xsd:attribute name="mime-type" type="xlf:mime-typeValueList" use="optional"/> + <xsd:attribute name="state" type="xlf:AttrType_state" use="optional"/> + <xsd:attribute name="state-qualifier" type="xlf:AttrType_state-qualifier" use="optional"/> + <xsd:attribute name="phase-name" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> + <xsd:attribute name="resname" type="xsd:string" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + </xsd:element> + <!-- Element for inline codes --> + <xsd:element name="g"> + <xsd:complexType mixed="true"> + <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> + <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> + <xsd:attribute default="yes" name="clone" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="x"> + <xsd:complexType> + <xsd:attribute name="ctype" type="xlf:AttrType_InlinePlaceholders" use="optional"/> + <xsd:attribute default="yes" name="clone" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="bx"> + <xsd:complexType> + <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> + <xsd:attribute default="yes" name="clone" type="xlf:AttrType_YesNo" use="optional"/> + <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="ex"> + <xsd:complexType> + <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> + <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="ph"> + <xsd:complexType mixed="true"> + <xsd:sequence maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="xlf:sub"/> + </xsd:sequence> + <xsd:attribute name="ctype" type="xlf:AttrType_InlinePlaceholders" use="optional"/> + <xsd:attribute name="crc" type="xsd:string" use="optional"/> + <xsd:attribute name="assoc" type="xlf:AttrType_assoc" use="optional"/> + <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="bpt"> + <xsd:complexType mixed="true"> + <xsd:sequence maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="xlf:sub"/> + </xsd:sequence> + <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> + <xsd:attribute name="crc" type="xsd:string" use="optional"/> + <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="ept"> + <xsd:complexType mixed="true"> + <xsd:sequence maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="xlf:sub"/> + </xsd:sequence> + <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="crc" type="xsd:string" use="optional"/> + <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="it"> + <xsd:complexType mixed="true"> + <xsd:sequence maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="xlf:sub"/> + </xsd:sequence> + <xsd:attribute name="pos" type="xlf:AttrType_Position" use="required"/> + <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> + <xsd:attribute name="crc" type="xsd:string" use="optional"/> + <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="sub"> + <xsd:complexType mixed="true"> + <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> + <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="optional"/> + <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> + <xsd:attribute name="xid" type="xsd:string" use="optional"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="mrk"> + <xsd:complexType mixed="true"> + <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> + <xsd:attribute name="mtype" type="xlf:AttrType_mtype" use="required"/> + <xsd:attribute name="mid" type="xsd:NMTOKEN" use="optional"/> + <xsd:attribute name="comment" type="xsd:string" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="strict"/> + </xsd:complexType> + </xsd:element> +</xsd:schema> diff --git a/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd new file mode 100644 index 0000000..963232f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd @@ -0,0 +1,411 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + XLIFF Version 2.0 + OASIS Standard + 05 August 2014 + Copyright (c) OASIS Open 2014. All rights reserved. + Source: http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/schemas/ + --> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xlf="urn:oasis:names:tc:xliff:document:2.0" + targetNamespace="urn:oasis:names:tc:xliff:document:2.0"> + + <!-- Import --> + + <xs:import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="informativeCopiesOf3rdPartySchemas/w3c/xml.xsd"/> + + <!-- Element Group --> + + <xs:group name="inline"> + <xs:choice> + <xs:element ref="xlf:cp"/> + <xs:element ref="xlf:ph"/> + <xs:element ref="xlf:pc"/> + <xs:element ref="xlf:sc"/> + <xs:element ref="xlf:ec"/> + <xs:element ref="xlf:mrk"/> + <xs:element ref="xlf:sm"/> + <xs:element ref="xlf:em"/> + </xs:choice> + </xs:group> + + <!-- Attribute Types --> + + <xs:simpleType name="yesNo"> + <xs:restriction base="xs:string"> + <xs:enumeration value="yes"/> + <xs:enumeration value="no"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="yesNoFirstNo"> + <xs:restriction base="xs:string"> + <xs:enumeration value="yes"/> + <xs:enumeration value="firstNo"/> + <xs:enumeration value="no"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="dirValue"> + <xs:restriction base="xs:string"> + <xs:enumeration value="ltr"/> + <xs:enumeration value="rtl"/> + <xs:enumeration value="auto"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="appliesTo"> + <xs:restriction base="xs:string"> + <xs:enumeration value="source"/> + <xs:enumeration value="target"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="userDefinedValue"> + <xs:restriction base="xs:string"> + <xs:pattern value="[^\s:]+:[^\s:]+"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="attrType_type"> + <xs:restriction base="xs:string"> + <xs:enumeration value="fmt"/> + <xs:enumeration value="ui"/> + <xs:enumeration value="quote"/> + <xs:enumeration value="link"/> + <xs:enumeration value="image"/> + <xs:enumeration value="other"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeForMrkValues"> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="generic"/> + <xs:enumeration value="comment"/> + <xs:enumeration value="term"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="attrType_typeForMrk"> + <xs:union memberTypes="xlf:typeForMrkValues xlf:userDefinedValue"/> + </xs:simpleType> + + <xs:simpleType name="priorityValue"> + <xs:restriction base="xs:positiveInteger"> + <xs:minInclusive value="1"/> + <xs:maxInclusive value="10"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="stateType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="initial"/> + <xs:enumeration value="translated"/> + <xs:enumeration value="reviewed"/> + <xs:enumeration value="final"/> + </xs:restriction> + </xs:simpleType> + + <!-- Structural Elements --> + + <xs:element name="xliff"> + <xs:complexType mixed="false"> + <xs:sequence> + <xs:element minOccurs="1" maxOccurs="unbounded" ref="xlf:file"/> + </xs:sequence> + <xs:attribute name="version" use="required"/> + <xs:attribute name="srcLang" use="required"/> + <xs:attribute name="trgLang" use="optional"/> + <xs:attribute ref="xml:space" use="optional" default="default"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="file"> + <xs:complexType mixed="false"> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="1" ref="xlf:skeleton"/> + <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" + processContents="lax"/> + <xs:element minOccurs="0" maxOccurs="1" ref="xlf:notes"/> + <xs:choice minOccurs="1" maxOccurs="unbounded"> + <xs:element ref="xlf:unit"/> + <xs:element ref="xlf:group"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> + <xs:attribute name="canResegment" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="original" use="optional"/> + <xs:attribute name="translate" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="srcDir" use="optional" type="xlf:dirValue" default="auto"/> + <xs:attribute name="trgDir" use="optional" type="xlf:dirValue" default="auto"/> + <xs:attribute ref="xml:space" use="optional"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="skeleton"> + <xs:complexType mixed="true"> + <xs:sequence> + <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" + processContents="lax"/> + </xs:sequence> + <xs:attribute name="href" use="optional"/> + </xs:complexType> + </xs:element> + + <xs:element name="group"> + <xs:complexType mixed="false"> + <xs:sequence> + <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" + processContents="lax"/> + <xs:element minOccurs="0" maxOccurs="1" ref="xlf:notes"/> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="xlf:unit"/> + <xs:element ref="xlf:group"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> + <xs:attribute name="name" use="optional"/> + <xs:attribute name="canResegment" use="optional" type="xlf:yesNo"/> + <xs:attribute name="translate" use="optional" type="xlf:yesNo"/> + <xs:attribute name="srcDir" use="optional" type="xlf:dirValue"/> + <xs:attribute name="trgDir" use="optional" type="xlf:dirValue"/> + <xs:attribute name="type" use="optional" type="xlf:userDefinedValue"/> + <xs:attribute ref="xml:space" use="optional"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="unit"> + <xs:complexType mixed="false"> + <xs:sequence> + <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" + processContents="lax"/> + <xs:element minOccurs="0" maxOccurs="1" ref="xlf:notes"/> + <xs:element minOccurs="0" maxOccurs="1" ref="xlf:originalData"/> + <xs:choice minOccurs="1" maxOccurs="unbounded"> + <xs:element ref="xlf:segment"/> + <xs:element ref="xlf:ignorable"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> + <xs:attribute name="name" use="optional"/> + <xs:attribute name="canResegment" use="optional" type="xlf:yesNo"/> + <xs:attribute name="translate" use="optional" type="xlf:yesNo"/> + <xs:attribute name="srcDir" use="optional" type="xlf:dirValue"/> + <xs:attribute name="trgDir" use="optional" type="xlf:dirValue"/> + <xs:attribute ref="xml:space" use="optional"/> + <xs:attribute name="type" use="optional" type="xlf:userDefinedValue"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="segment"> + <xs:complexType mixed="false"> + <xs:sequence> + <xs:element minOccurs="1" maxOccurs="1" ref="xlf:source"/> + <xs:element minOccurs="0" maxOccurs="1" ref="xlf:target"/> + </xs:sequence> + <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="canResegment" use="optional" type="xlf:yesNo"/> + <xs:attribute name="state" use="optional" type="xlf:stateType" default="initial"/> + <xs:attribute name="subState" use="optional"/> + </xs:complexType> + </xs:element> + + <xs:element name="ignorable"> + <xs:complexType mixed="false"> + <xs:sequence> + <xs:element minOccurs="1" maxOccurs="1" ref="xlf:source"/> + <xs:element minOccurs="0" maxOccurs="1" ref="xlf:target"/> + </xs:sequence> + <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/> + </xs:complexType> + </xs:element> + + <xs:element name="notes"> + <xs:complexType mixed="false"> + <xs:sequence> + <xs:element minOccurs="1" maxOccurs="unbounded" ref="xlf:note"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="note"> + <xs:complexType mixed="true"> + <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="appliesTo" use="optional" type="xlf:appliesTo"/> + <xs:attribute name="category" use="optional"/> + <xs:attribute name="priority" use="optional" type="xlf:priorityValue" default="1"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="originalData"> + <xs:complexType mixed="false"> + <xs:sequence> + <xs:element minOccurs="1" maxOccurs="unbounded" ref="xlf:data"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="data"> + <xs:complexType mixed="true"> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="xlf:cp"/> + </xs:sequence> + <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> + <xs:attribute name="dir" use="optional" type="xlf:dirValue" default="auto"/> + <xs:attribute ref="xml:space" use="optional" fixed="preserve"/> + </xs:complexType> + </xs:element> + + <xs:element name="source"> + <xs:complexType mixed="true"> + <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/> + <xs:attribute ref="xml:lang" use="optional"/> + <xs:attribute ref="xml:space" use="optional"/> + </xs:complexType> + </xs:element> + + <xs:element name="target"> + <xs:complexType mixed="true"> + <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/> + <xs:attribute ref="xml:lang" use="optional"/> + <xs:attribute ref="xml:space" use="optional"/> + <xs:attribute name="order" use="optional" type="xs:positiveInteger"/> + </xs:complexType> + </xs:element> + + <!-- Inline Elements --> + + <xs:element name="cp"> + <!-- Code Point --> + <xs:complexType mixed="false"> + <xs:attribute name="hex" use="required" type="xs:hexBinary"/> + </xs:complexType> + </xs:element> + + <xs:element name="ph"> + <!-- Placeholder --> + <xs:complexType mixed="false"> + <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/> + <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="disp" use="optional"/> + <xs:attribute name="equiv" use="optional"/> + <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> + <xs:attribute name="dataRef" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="subFlows" use="optional" type="xs:NMTOKENS"/> + <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/> + <xs:attribute name="type" use="optional" type="xlf:attrType_type"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="pc"> + <!-- Paired Code --> + <xs:complexType mixed="true"> + <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/> + <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canOverlap" use="optional" type="xlf:yesNo"/> + <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/> + <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="dispEnd" use="optional"/> + <xs:attribute name="dispStart" use="optional"/> + <xs:attribute name="equivEnd" use="optional"/> + <xs:attribute name="equivStart" use="optional"/> + <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> + <xs:attribute name="dataRefEnd" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="dataRefStart" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="subFlowsEnd" use="optional" type="xs:NMTOKENS"/> + <xs:attribute name="subFlowsStart" use="optional" type="xs:NMTOKENS"/> + <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/> + <xs:attribute name="type" use="optional" type="xlf:attrType_type"/> + <xs:attribute name="dir" use="optional" type="xlf:dirValue"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="sc"> + <!-- Start Code --> + <xs:complexType mixed="false"> + <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canOverlap" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/> + <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="dataRef" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="dir" use="optional" type="xlf:dirValue"/> + <xs:attribute name="disp" use="optional"/> + <xs:attribute name="equiv" use="optional"/> + <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> + <xs:attribute name="isolated" use="optional" type="xlf:yesNo" default="no"/> + <xs:attribute name="subFlows" use="optional" type="xs:NMTOKENS"/> + <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/> + <xs:attribute name="type" use="optional" type="xlf:attrType_type"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="ec"> + <!-- End Code --> + <xs:complexType mixed="false"> + <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canOverlap" use="optional" type="xlf:yesNo" default="yes"/> + <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/> + <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="dataRef" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="dir" use="optional" type="xlf:dirValue"/> + <xs:attribute name="disp" use="optional"/> + <xs:attribute name="equiv" use="optional"/> + <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="isolated" use="optional" type="xlf:yesNo" default="no"/> + <xs:attribute name="startRef" use="optional" type="xs:NMTOKEN"/> + <xs:attribute name="subFlows" use="optional" type="xs:NMTOKENS"/> + <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/> + <xs:attribute name="type" use="optional" type="xlf:attrType_type"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="mrk"> + <!-- Annotation Marker --> + <xs:complexType mixed="true"> + <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/> + <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> + <xs:attribute name="translate" use="optional" type="xlf:yesNo"/> + <xs:attribute name="type" use="optional" type="xlf:attrType_typeForMrk"/> + <xs:attribute name="ref" use="optional" type="xs:anyURI"/> + <xs:attribute name="value" use="optional"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="sm"> + <!-- Start Annotation Marker --> + <xs:complexType mixed="false"> + <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> + <xs:attribute name="translate" use="optional" type="xlf:yesNo"/> + <xs:attribute name="type" use="optional" type="xlf:attrType_typeForMrk"/> + <xs:attribute name="ref" use="optional" type="xs:anyURI"/> + <xs:attribute name="value" use="optional"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="em"> + <!-- End Annotation Marker --> + <xs:complexType mixed="false"> + <xs:attribute name="startRef" use="required" type="xs:NMTOKEN"/> + </xs:complexType> + </xs:element> + +</xs:schema> diff --git a/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xml.xsd b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xml.xsd new file mode 100644 index 0000000..a46162a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xml.xsd @@ -0,0 +1,309 @@ +<?xml version='1.0'?> +<?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?> +<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns ="http://www.w3.org/1999/xhtml" + xml:lang="en"> + + <xs:annotation> + <xs:documentation> + <div> + <h1>About the XML namespace</h1> + + <div class="bodytext"> + <p> + + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + </p> + <p> + See <a href="http://www.w3.org/XML/1998/namespace.html"> + http://www.w3.org/XML/1998/namespace.html</a> and + <a href="http://www.w3.org/TR/REC-xml"> + http://www.w3.org/TR/REC-xml</a> for information + about this namespace. + </p> + + <p> + Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. + </p> + <p> + See further below in this document for more information about <a + href="#usage">how to refer to this schema document from your own + XSD schema documents</a> and about <a href="#nsversioning">the + namespace-versioning policy governing this schema document</a>. + </p> + </div> + </div> + + </xs:documentation> + </xs:annotation> + + <xs:attribute name="lang"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>lang (as an attribute name)</h3> + <p> + + denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.</p> + + </div> + <div> + <h4>Notes</h4> + <p> + Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. + </p> + <p> + + See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"> + http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a> + and the IANA language subtag registry at + <a href="http://www.iana.org/assignments/language-subtag-registry"> + http://www.iana.org/assignments/language-subtag-registry</a> + for further information. + </p> + <p> + + The union allows for the 'un-declaration' of xml:lang with + the empty string. + </p> + </div> + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:union memberTypes="xs:language"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value=""/> + + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="space"> + <xs:annotation> + <xs:documentation> + + <div> + + <h3>space (as an attribute name)</h3> + <p> + denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.</p> + + </div> + </xs:documentation> + </xs:annotation> + <xs:simpleType> + + <xs:restriction base="xs:NCName"> + <xs:enumeration value="default"/> + <xs:enumeration value="preserve"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="base" type="xs:anyURI"> <xs:annotation> + <xs:documentation> + + <div> + + <h3>base (as an attribute name)</h3> + <p> + denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.</p> + + <p> + See <a + href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a> + for information about this attribute. + </p> + + </div> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="id" type="xs:ID"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>id (as an attribute name)</h3> + <p> + + denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.</p> + + <p> + See <a + href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a> + for information about this attribute. + </p> + </div> + </xs:documentation> + </xs:annotation> + + </xs:attribute> + + <xs:attributeGroup name="specialAttrs"> + <xs:attribute ref="xml:base"/> + <xs:attribute ref="xml:lang"/> + <xs:attribute ref="xml:space"/> + <xs:attribute ref="xml:id"/> + </xs:attributeGroup> + + <xs:annotation> + + <xs:documentation> + <div> + + <h3>Father (in any context at all)</h3> + + <div class="bodytext"> + <p> + denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + </p> + <blockquote> + <p> + + In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". + </p> + </blockquote> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + + <div xml:id="usage" id="usage"> + <h2><a name="usage">About this schema document</a></h2> + + <div class="bodytext"> + <p> + This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow <code>xml:base</code>, + <code>xml:lang</code>, <code>xml:space</code> or + <code>xml:id</code> attributes on elements they define. + </p> + + <p> + To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: + </p> + <pre> + <schema.. .> + .. . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + </pre> + <p> + or + </p> + <pre> + + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2009/01/xml.xsd"/> + </pre> + <p> + Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. + </p> + <pre> + <type.. .> + .. . + <attributeGroup ref="xml:specialAttrs"/> + </pre> + <p> + will define a type which will schema-validate an instance element + with any of those attributes. + </p> + + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + <div id="nsversioning" xml:id="nsversioning"> + <h2><a name="nsversioning">Versioning policy for this schema document</a></h2> + + <div class="bodytext"> + <p> + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + <a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd</a>. + </p> + <p> + At the date of issue it can also be found at + <a href="http://www.w3.org/2001/xml.xsd"> + http://www.w3.org/2001/xml.xsd</a>. + </p> + + <p> + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at <a href="http://www.w3.org/2001/xml.xsd"> + http://www.w3.org/2001/xml.xsd + </a> + will change accordingly; the version at + <a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd + </a> + will not change. + </p> + <p> + + Previous dated (and unchanging) versions of this schema + document are at: + </p> + <ul> + <li><a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd</a></li> + <li><a href="http://www.w3.org/2007/08/xml.xsd"> + http://www.w3.org/2007/08/xml.xsd</a></li> + <li><a href="http://www.w3.org/2004/10/xml.xsd"> + + http://www.w3.org/2004/10/xml.xsd</a></li> + <li><a href="http://www.w3.org/2001/03/xml.xsd"> + http://www.w3.org/2001/03/xml.xsd</a></li> + </ul> + </div> + </div> + </xs:documentation> + </xs:annotation> + +</xs:schema> diff --git a/public/system/storage/vendor/symfony/translation/LoggingTranslator.php b/public/system/storage/vendor/symfony/translation/LoggingTranslator.php new file mode 100644 index 0000000..fa5c5cc --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/LoggingTranslator.php @@ -0,0 +1,124 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Psr\Log\LoggerInterface; + +/** + * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> + */ +class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface +{ + /** + * @var TranslatorInterface|TranslatorBagInterface + */ + private $translator; + + /** + * @var LoggerInterface + */ + private $logger; + + /** + * @param TranslatorInterface $translator The translator must implement TranslatorBagInterface + * @param LoggerInterface $logger + */ + public function __construct(TranslatorInterface $translator, LoggerInterface $logger) + { + if (!$translator instanceof TranslatorBagInterface) { + throw new \InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator))); + } + + $this->translator = $translator; + $this->logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->trans($id, $parameters, $domain, $locale); + $this->log($id, $domain, $locale); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale); + $this->log($id, $domain, $locale); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->translator->setLocale($locale); + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->translator->getLocale(); + } + + /** + * {@inheritdoc} + */ + public function getCatalogue($locale = null) + { + return $this->translator->getCatalogue($locale); + } + + /** + * Passes through all unknown calls onto the translator object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->translator, $method), $args); + } + + /** + * Logs for missing translations. + * + * @param string $id + * @param string|null $domain + * @param string|null $locale + */ + private function log($id, $domain, $locale) + { + if (null === $domain) { + $domain = 'messages'; + } + + $id = (string) $id; + $catalogue = $this->translator->getCatalogue($locale); + if ($catalogue->defines($id, $domain)) { + return; + } + + if ($catalogue->has($id, $domain)) { + $this->logger->debug('Translation use fallback catalogue.', array('id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale())); + } else { + $this->logger->warning('Translation not found.', array('id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale())); + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/MessageCatalogue.php b/public/system/storage/vendor/symfony/translation/MessageCatalogue.php new file mode 100644 index 0000000..dd354a8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/MessageCatalogue.php @@ -0,0 +1,270 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Config\Resource\ResourceInterface; + +/** + * MessageCatalogue. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterface +{ + private $messages = array(); + private $metadata = array(); + private $resources = array(); + private $locale; + private $fallbackCatalogue; + private $parent; + + /** + * Constructor. + * + * @param string $locale The locale + * @param array $messages An array of messages classified by domain + */ + public function __construct($locale, array $messages = array()) + { + $this->locale = $locale; + $this->messages = $messages; + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->locale; + } + + /** + * {@inheritdoc} + */ + public function getDomains() + { + return array_keys($this->messages); + } + + /** + * {@inheritdoc} + */ + public function all($domain = null) + { + if (null === $domain) { + return $this->messages; + } + + return isset($this->messages[$domain]) ? $this->messages[$domain] : array(); + } + + /** + * {@inheritdoc} + */ + public function set($id, $translation, $domain = 'messages') + { + $this->add(array($id => $translation), $domain); + } + + /** + * {@inheritdoc} + */ + public function has($id, $domain = 'messages') + { + if (isset($this->messages[$domain][$id])) { + return true; + } + + if (null !== $this->fallbackCatalogue) { + return $this->fallbackCatalogue->has($id, $domain); + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function defines($id, $domain = 'messages') + { + return isset($this->messages[$domain][$id]); + } + + /** + * {@inheritdoc} + */ + public function get($id, $domain = 'messages') + { + if (isset($this->messages[$domain][$id])) { + return $this->messages[$domain][$id]; + } + + if (null !== $this->fallbackCatalogue) { + return $this->fallbackCatalogue->get($id, $domain); + } + + return $id; + } + + /** + * {@inheritdoc} + */ + public function replace($messages, $domain = 'messages') + { + $this->messages[$domain] = array(); + + $this->add($messages, $domain); + } + + /** + * {@inheritdoc} + */ + public function add($messages, $domain = 'messages') + { + if (!isset($this->messages[$domain])) { + $this->messages[$domain] = $messages; + } else { + $this->messages[$domain] = array_replace($this->messages[$domain], $messages); + } + } + + /** + * {@inheritdoc} + */ + public function addCatalogue(MessageCatalogueInterface $catalogue) + { + if ($catalogue->getLocale() !== $this->locale) { + throw new \LogicException(sprintf('Cannot add a catalogue for locale "%s" as the current locale for this catalogue is "%s"', $catalogue->getLocale(), $this->locale)); + } + + foreach ($catalogue->all() as $domain => $messages) { + $this->add($messages, $domain); + } + + foreach ($catalogue->getResources() as $resource) { + $this->addResource($resource); + } + + if ($catalogue instanceof MetadataAwareInterface) { + $metadata = $catalogue->getMetadata('', ''); + $this->addMetadata($metadata); + } + } + + /** + * {@inheritdoc} + */ + public function addFallbackCatalogue(MessageCatalogueInterface $catalogue) + { + // detect circular references + $c = $catalogue; + while ($c = $c->getFallbackCatalogue()) { + if ($c->getLocale() === $this->getLocale()) { + throw new \LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); + } + } + + $c = $this; + do { + if ($c->getLocale() === $catalogue->getLocale()) { + throw new \LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); + } + } while ($c = $c->parent); + + $catalogue->parent = $this; + $this->fallbackCatalogue = $catalogue; + + foreach ($catalogue->getResources() as $resource) { + $this->addResource($resource); + } + } + + /** + * {@inheritdoc} + */ + public function getFallbackCatalogue() + { + return $this->fallbackCatalogue; + } + + /** + * {@inheritdoc} + */ + public function getResources() + { + return array_values($this->resources); + } + + /** + * {@inheritdoc} + */ + public function addResource(ResourceInterface $resource) + { + $this->resources[$resource->__toString()] = $resource; + } + + /** + * {@inheritdoc} + */ + public function getMetadata($key = '', $domain = 'messages') + { + if ('' == $domain) { + return $this->metadata; + } + + if (isset($this->metadata[$domain])) { + if ('' == $key) { + return $this->metadata[$domain]; + } + + if (isset($this->metadata[$domain][$key])) { + return $this->metadata[$domain][$key]; + } + } + } + + /** + * {@inheritdoc} + */ + public function setMetadata($key, $value, $domain = 'messages') + { + $this->metadata[$domain][$key] = $value; + } + + /** + * {@inheritdoc} + */ + public function deleteMetadata($key = '', $domain = 'messages') + { + if ('' == $domain) { + $this->metadata = array(); + } elseif ('' == $key) { + unset($this->metadata[$domain]); + } else { + unset($this->metadata[$domain][$key]); + } + } + + /** + * Adds current values with the new values. + * + * @param array $values Values to add + */ + private function addMetadata(array $values) + { + foreach ($values as $domain => $keys) { + foreach ($keys as $key => $value) { + $this->setMetadata($key, $value, $domain); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/MessageCatalogueInterface.php b/public/system/storage/vendor/symfony/translation/MessageCatalogueInterface.php new file mode 100644 index 0000000..b1b516d --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/MessageCatalogueInterface.php @@ -0,0 +1,142 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Config\Resource\ResourceInterface; + +/** + * MessageCatalogueInterface. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +interface MessageCatalogueInterface +{ + /** + * Gets the catalogue locale. + * + * @return string The locale + */ + public function getLocale(); + + /** + * Gets the domains. + * + * @return array An array of domains + */ + public function getDomains(); + + /** + * Gets the messages within a given domain. + * + * If $domain is null, it returns all messages. + * + * @param string $domain The domain name + * + * @return array An array of messages + */ + public function all($domain = null); + + /** + * Sets a message translation. + * + * @param string $id The message id + * @param string $translation The messages translation + * @param string $domain The domain name + */ + public function set($id, $translation, $domain = 'messages'); + + /** + * Checks if a message has a translation. + * + * @param string $id The message id + * @param string $domain The domain name + * + * @return bool true if the message has a translation, false otherwise + */ + public function has($id, $domain = 'messages'); + + /** + * Checks if a message has a translation (it does not take into account the fallback mechanism). + * + * @param string $id The message id + * @param string $domain The domain name + * + * @return bool true if the message has a translation, false otherwise + */ + public function defines($id, $domain = 'messages'); + + /** + * Gets a message translation. + * + * @param string $id The message id + * @param string $domain The domain name + * + * @return string The message translation + */ + public function get($id, $domain = 'messages'); + + /** + * Sets translations for a given domain. + * + * @param array $messages An array of translations + * @param string $domain The domain name + */ + public function replace($messages, $domain = 'messages'); + + /** + * Adds translations for a given domain. + * + * @param array $messages An array of translations + * @param string $domain The domain name + */ + public function add($messages, $domain = 'messages'); + + /** + * Merges translations from the given Catalogue into the current one. + * + * The two catalogues must have the same locale. + * + * @param MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance + */ + public function addCatalogue(MessageCatalogueInterface $catalogue); + + /** + * Merges translations from the given Catalogue into the current one + * only when the translation does not exist. + * + * This is used to provide default translations when they do not exist for the current locale. + * + * @param MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance + */ + public function addFallbackCatalogue(MessageCatalogueInterface $catalogue); + + /** + * Gets the fallback catalogue. + * + * @return MessageCatalogueInterface|null A MessageCatalogueInterface instance or null when no fallback has been set + */ + public function getFallbackCatalogue(); + + /** + * Returns an array of resources loaded to build this collection. + * + * @return ResourceInterface[] An array of resources + */ + public function getResources(); + + /** + * Adds a resource for this collection. + * + * @param ResourceInterface $resource A resource instance + */ + public function addResource(ResourceInterface $resource); +} diff --git a/public/system/storage/vendor/symfony/translation/MessageSelector.php b/public/system/storage/vendor/symfony/translation/MessageSelector.php new file mode 100644 index 0000000..bdbb0f9 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/MessageSelector.php @@ -0,0 +1,86 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * MessageSelector. + * + * @author Fabien Potencier <fabien@symfony.com> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class MessageSelector +{ + /** + * Given a message with different plural translations separated by a + * pipe (|), this method returns the correct portion of the message based + * on the given number, locale and the pluralization rules in the message + * itself. + * + * The message supports two different types of pluralization rules: + * + * interval: {0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples + * indexed: There is one apple|There are %count% apples + * + * The indexed solution can also contain labels (e.g. one: There is one apple). + * This is purely for making the translations more clear - it does not + * affect the functionality. + * + * The two methods can also be mixed: + * {0} There are no apples|one: There is one apple|more: There are %count% apples + * + * @param string $message The message being translated + * @param int $number The number of items represented for the message + * @param string $locale The locale to use for choosing + * + * @return string + * + * @throws \InvalidArgumentException + */ + public function choose($message, $number, $locale) + { + $parts = explode('|', $message); + $explicitRules = array(); + $standardRules = array(); + foreach ($parts as $part) { + $part = trim($part); + + if (preg_match('/^(?P<interval>'.Interval::getIntervalRegexp().')\s*(?P<message>.*?)$/xs', $part, $matches)) { + $explicitRules[$matches['interval']] = $matches['message']; + } elseif (preg_match('/^\w+\:\s*(.*?)$/', $part, $matches)) { + $standardRules[] = $matches[1]; + } else { + $standardRules[] = $part; + } + } + + // try to match an explicit rule, then fallback to the standard ones + foreach ($explicitRules as $interval => $m) { + if (Interval::test($number, $interval)) { + return $m; + } + } + + $position = PluralizationRules::get($number, $locale); + + if (!isset($standardRules[$position])) { + // when there's exactly one rule given, and that rule is a standard + // rule, use this rule + if (1 === count($parts) && isset($standardRules[0])) { + return $standardRules[0]; + } + + throw new \InvalidArgumentException(sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $message, $locale, $number)); + } + + return $standardRules[$position]; + } +} diff --git a/public/system/storage/vendor/symfony/translation/MetadataAwareInterface.php b/public/system/storage/vendor/symfony/translation/MetadataAwareInterface.php new file mode 100644 index 0000000..e93c6fb --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/MetadataAwareInterface.php @@ -0,0 +1,54 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * MetadataAwareInterface. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +interface MetadataAwareInterface +{ + /** + * Gets metadata for the given domain and key. + * + * Passing an empty domain will return an array with all metadata indexed by + * domain and then by key. Passing an empty key will return an array with all + * metadata for the given domain. + * + * @param string $key The key + * @param string $domain The domain name + * + * @return mixed The value that was set or an array with the domains/keys or null + */ + public function getMetadata($key = '', $domain = 'messages'); + + /** + * Adds metadata to a message domain. + * + * @param string $key The key + * @param mixed $value The value + * @param string $domain The domain name + */ + public function setMetadata($key, $value, $domain = 'messages'); + + /** + * Deletes metadata for the given key and domain. + * + * Passing an empty domain will delete all metadata. Passing an empty key will + * delete all metadata for the given domain. + * + * @param string $key The key + * @param string $domain The domain name + */ + public function deleteMetadata($key = '', $domain = 'messages'); +} diff --git a/public/system/storage/vendor/symfony/translation/PluralizationRules.php b/public/system/storage/vendor/symfony/translation/PluralizationRules.php new file mode 100644 index 0000000..ef2be70 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/PluralizationRules.php @@ -0,0 +1,209 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * Returns the plural rules for a given locale. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class PluralizationRules +{ + private static $rules = array(); + + /** + * Returns the plural position to use for the given locale and number. + * + * @param int $number The number + * @param string $locale The locale + * + * @return int The plural position + */ + public static function get($number, $locale) + { + if ('pt_BR' === $locale) { + // temporary set a locale for brazilian + $locale = 'xbr'; + } + + if (strlen($locale) > 3) { + $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); + } + + if (isset(self::$rules[$locale])) { + $return = call_user_func(self::$rules[$locale], $number); + + if (!is_int($return) || $return < 0) { + return 0; + } + + return $return; + } + + /* + * The plural rules are derived from code of the Zend Framework (2010-09-25), + * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd). + * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + */ + switch ($locale) { + case 'az': + case 'bo': + case 'dz': + case 'id': + case 'ja': + case 'jv': + case 'ka': + case 'km': + case 'kn': + case 'ko': + case 'ms': + case 'th': + case 'tr': + case 'vi': + case 'zh': + return 0; + break; + + case 'af': + case 'bn': + case 'bg': + case 'ca': + case 'da': + case 'de': + case 'el': + case 'en': + case 'eo': + case 'es': + case 'et': + case 'eu': + case 'fa': + case 'fi': + case 'fo': + case 'fur': + case 'fy': + case 'gl': + case 'gu': + case 'ha': + case 'he': + case 'hu': + case 'is': + case 'it': + case 'ku': + case 'lb': + case 'ml': + case 'mn': + case 'mr': + case 'nah': + case 'nb': + case 'ne': + case 'nl': + case 'nn': + case 'no': + case 'om': + case 'or': + case 'pa': + case 'pap': + case 'ps': + case 'pt': + case 'so': + case 'sq': + case 'sv': + case 'sw': + case 'ta': + case 'te': + case 'tk': + case 'ur': + case 'zu': + return ($number == 1) ? 0 : 1; + + case 'am': + case 'bh': + case 'fil': + case 'fr': + case 'gun': + case 'hi': + case 'hy': + case 'ln': + case 'mg': + case 'nso': + case 'xbr': + case 'ti': + case 'wa': + return (($number == 0) || ($number == 1)) ? 0 : 1; + + case 'be': + case 'bs': + case 'hr': + case 'ru': + case 'sr': + case 'uk': + return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + + case 'cs': + case 'sk': + return ($number == 1) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); + + case 'ga': + return ($number == 1) ? 0 : (($number == 2) ? 1 : 2); + + case 'lt': + return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + + case 'sl': + return ($number % 100 == 1) ? 0 : (($number % 100 == 2) ? 1 : ((($number % 100 == 3) || ($number % 100 == 4)) ? 2 : 3)); + + case 'mk': + return ($number % 10 == 1) ? 0 : 1; + + case 'mt': + return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); + + case 'lv': + return ($number == 0) ? 0 : ((($number % 10 == 1) && ($number % 100 != 11)) ? 1 : 2); + + case 'pl': + return ($number == 1) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); + + case 'cy': + return ($number == 1) ? 0 : (($number == 2) ? 1 : ((($number == 8) || ($number == 11)) ? 2 : 3)); + + case 'ro': + return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); + + case 'ar': + return ($number == 0) ? 0 : (($number == 1) ? 1 : (($number == 2) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); + + default: + return 0; + } + } + + /** + * Overrides the default plural rule for a given locale. + * + * @param callable $rule A PHP callable + * @param string $locale The locale + */ + public static function set(callable $rule, $locale) + { + if ('pt_BR' === $locale) { + // temporary set a locale for brazilian + $locale = 'xbr'; + } + + if (strlen($locale) > 3) { + $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); + } + + self::$rules[$locale] = $rule; + } +} diff --git a/public/system/storage/vendor/symfony/translation/README.md b/public/system/storage/vendor/symfony/translation/README.md new file mode 100644 index 0000000..46f3d1f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/README.md @@ -0,0 +1,13 @@ +Translation Component +===================== + +The Translation component provides tools to internationalize your application. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/translation/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/public/system/storage/vendor/symfony/translation/Tests/Catalogue/AbstractOperationTest.php b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/AbstractOperationTest.php new file mode 100644 index 0000000..30c21af --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/AbstractOperationTest.php @@ -0,0 +1,73 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Catalogue; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +abstract class AbstractOperationTest extends \PHPUnit_Framework_TestCase +{ + public function testGetEmptyDomains() + { + $this->assertEquals( + array(), + $this->createOperation( + new MessageCatalogue('en'), + new MessageCatalogue('en') + )->getDomains() + ); + } + + public function testGetMergedDomains() + { + $this->assertEquals( + array('a', 'b', 'c'), + $this->createOperation( + new MessageCatalogue('en', array('a' => array(), 'b' => array())), + new MessageCatalogue('en', array('b' => array(), 'c' => array())) + )->getDomains() + ); + } + + public function testGetMessagesFromUnknownDomain() + { + $this->setExpectedException('InvalidArgumentException'); + $this->createOperation( + new MessageCatalogue('en'), + new MessageCatalogue('en') + )->getMessages('domain'); + } + + public function testGetEmptyMessages() + { + $this->assertEquals( + array(), + $this->createOperation( + new MessageCatalogue('en', array('a' => array())), + new MessageCatalogue('en') + )->getMessages('a') + ); + } + + public function testGetEmptyResult() + { + $this->assertEquals( + new MessageCatalogue('en'), + $this->createOperation( + new MessageCatalogue('en'), + new MessageCatalogue('en') + )->getResult() + ); + } + + abstract protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target); +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Catalogue/MergeOperationTest.php b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/MergeOperationTest.php new file mode 100644 index 0000000..8b51c15 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/MergeOperationTest.php @@ -0,0 +1,83 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Catalogue; + +use Symfony\Component\Translation\Catalogue\MergeOperation; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +class MergeOperationTest extends AbstractOperationTest +{ + public function testGetMessagesFromSingleDomain() + { + $operation = $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + ); + + $this->assertEquals( + array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), + $operation->getMessages('messages') + ); + + $this->assertEquals( + array('c' => 'new_c'), + $operation->getNewMessages('messages') + ); + + $this->assertEquals( + array(), + $operation->getObsoleteMessages('messages') + ); + } + + public function testGetResultFromSingleDomain() + { + $this->assertEquals( + new MessageCatalogue('en', array( + 'messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), + )), + $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + )->getResult() + ); + } + + public function testGetResultWithMetadata() + { + $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); + $leftCatalogue->setMetadata('a', 'foo', 'messages'); + $leftCatalogue->setMetadata('b', 'bar', 'messages'); + $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); + $rightCatalogue->setMetadata('b', 'baz', 'messages'); + $rightCatalogue->setMetadata('c', 'qux', 'messages'); + + $mergedCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'))); + $mergedCatalogue->setMetadata('a', 'foo', 'messages'); + $mergedCatalogue->setMetadata('b', 'bar', 'messages'); + $mergedCatalogue->setMetadata('c', 'qux', 'messages'); + + $this->assertEquals( + $mergedCatalogue, + $this->createOperation( + $leftCatalogue, + $rightCatalogue + )->getResult() + ); + } + + protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target) + { + return new MergeOperation($source, $target); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Catalogue/TargetOperationTest.php b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/TargetOperationTest.php new file mode 100644 index 0000000..271d17f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/TargetOperationTest.php @@ -0,0 +1,82 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Catalogue; + +use Symfony\Component\Translation\Catalogue\TargetOperation; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +class TargetOperationTest extends AbstractOperationTest +{ + public function testGetMessagesFromSingleDomain() + { + $operation = $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + ); + + $this->assertEquals( + array('a' => 'old_a', 'c' => 'new_c'), + $operation->getMessages('messages') + ); + + $this->assertEquals( + array('c' => 'new_c'), + $operation->getNewMessages('messages') + ); + + $this->assertEquals( + array('b' => 'old_b'), + $operation->getObsoleteMessages('messages') + ); + } + + public function testGetResultFromSingleDomain() + { + $this->assertEquals( + new MessageCatalogue('en', array( + 'messages' => array('a' => 'old_a', 'c' => 'new_c'), + )), + $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + )->getResult() + ); + } + + public function testGetResultWithMetadata() + { + $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); + $leftCatalogue->setMetadata('a', 'foo', 'messages'); + $leftCatalogue->setMetadata('b', 'bar', 'messages'); + $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); + $rightCatalogue->setMetadata('b', 'baz', 'messages'); + $rightCatalogue->setMetadata('c', 'qux', 'messages'); + + $diffCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'old_b', 'c' => 'new_c'))); + $diffCatalogue->setMetadata('b', 'bar', 'messages'); + $diffCatalogue->setMetadata('c', 'qux', 'messages'); + + $this->assertEquals( + $diffCatalogue, + $this->createOperation( + $leftCatalogue, + $rightCatalogue + )->getResult() + ); + } + + protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target) + { + return new TargetOperation($source, $target); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php b/public/system/storage/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php new file mode 100644 index 0000000..3d1e86e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php @@ -0,0 +1,148 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\DataCollector; + +use Symfony\Component\Translation\DataCollectorTranslator; +use Symfony\Component\Translation\DataCollector\TranslationDataCollector; + +class TranslationDataCollectorTest extends \PHPUnit_Framework_TestCase +{ + protected function setUp() + { + if (!class_exists('Symfony\Component\HttpKernel\DataCollector\DataCollector')) { + $this->markTestSkipped('The "DataCollector" is not available'); + } + } + + public function testCollectEmptyMessages() + { + $translator = $this->getTranslator(); + $translator->expects($this->any())->method('getCollectedMessages')->will($this->returnValue(array())); + + $dataCollector = new TranslationDataCollector($translator); + $dataCollector->lateCollect(); + + $this->assertEquals(0, $dataCollector->getCountMissings()); + $this->assertEquals(0, $dataCollector->getCountFallbacks()); + $this->assertEquals(0, $dataCollector->getCountDefines()); + $this->assertEquals(array(), $dataCollector->getMessages()); + } + + public function testCollect() + { + $collectedMessages = array( + array( + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 3), + 'transChoiceNumber' => 3, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 3), + 'transChoiceNumber' => 3, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 4, '%foo%' => 'bar'), + 'transChoiceNumber' => 4, + ), + ); + $expectedMessages = array( + array( + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'count' => 1, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'count' => 1, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'count' => 3, + 'parameters' => array( + array('%count%' => 3), + array('%count%' => 3), + array('%count%' => 4, '%foo%' => 'bar'), + ), + 'transChoiceNumber' => 3, + ), + ); + + $translator = $this->getTranslator(); + $translator->expects($this->any())->method('getCollectedMessages')->will($this->returnValue($collectedMessages)); + + $dataCollector = new TranslationDataCollector($translator); + $dataCollector->lateCollect(); + + $this->assertEquals(1, $dataCollector->getCountMissings()); + $this->assertEquals(1, $dataCollector->getCountFallbacks()); + $this->assertEquals(1, $dataCollector->getCountDefines()); + $this->assertEquals($expectedMessages, array_values($dataCollector->getMessages())); + } + + private function getTranslator() + { + $translator = $this + ->getMockBuilder('Symfony\Component\Translation\DataCollectorTranslator') + ->disableOriginalConstructor() + ->getMock() + ; + + return $translator; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php b/public/system/storage/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php new file mode 100644 index 0000000..5ef8171 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php @@ -0,0 +1,93 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\DataCollectorTranslator; +use Symfony\Component\Translation\Loader\ArrayLoader; + +class DataCollectorTranslatorTest extends \PHPUnit_Framework_TestCase +{ + public function testCollectMessages() + { + $collector = $this->createCollector(); + $collector->setFallbackLocales(array('fr', 'ru')); + + $collector->trans('foo'); + $collector->trans('bar'); + $collector->transChoice('choice', 0); + $collector->trans('bar_ru'); + $collector->trans('bar_ru', array('foo' => 'bar')); + + $expectedMessages = array(); + $expectedMessages[] = array( + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'parameters' => array(), + 'transChoiceNumber' => null, + ); + $expectedMessages[] = array( + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, + ); + $expectedMessages[] = array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array(), + 'transChoiceNumber' => 0, + ); + $expectedMessages[] = array( + 'id' => 'bar_ru', + 'translation' => 'bar (ru)', + 'locale' => 'ru', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, + ); + $expectedMessages[] = array( + 'id' => 'bar_ru', + 'translation' => 'bar (ru)', + 'locale' => 'ru', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array('foo' => 'bar'), + 'transChoiceNumber' => null, + ); + + $this->assertEquals($expectedMessages, $collector->getCollectedMessages()); + } + + private function createCollector() + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (en)'), 'en'); + $translator->addResource('array', array('bar' => 'bar (fr)'), 'fr'); + $translator->addResource('array', array('bar_ru' => 'bar (ru)'), 'ru'); + + $collector = new DataCollectorTranslator($translator); + + return $collector; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php new file mode 100644 index 0000000..9613192 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\CsvFileDumper; + +class CsvFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar', 'bar' => 'foo +foo', 'foo;foo' => 'bar')); + + $dumper = new CsvFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/valid.csv', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php new file mode 100644 index 0000000..ed58546 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php @@ -0,0 +1,83 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\FileDumper; + +class FileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testDump() + { + $tempDir = sys_get_temp_dir(); + + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new ConcreteFileDumper(); + $dumper->dump($catalogue, array('path' => $tempDir)); + + $this->assertTrue(file_exists($tempDir.'/messages.en.concrete')); + } + + public function testDumpBackupsFileIfExisting() + { + $tempDir = sys_get_temp_dir(); + $file = $tempDir.'/messages.en.concrete'; + $backupFile = $file.'~'; + + @touch($file); + + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new ConcreteFileDumper(); + $dumper->dump($catalogue, array('path' => $tempDir)); + + $this->assertTrue(file_exists($backupFile)); + + @unlink($file); + @unlink($backupFile); + } + + public function testDumpCreatesNestedDirectoriesAndFile() + { + $tempDir = sys_get_temp_dir(); + $translationsDir = $tempDir.'/test/translations'; + $file = $translationsDir.'/messages.en.concrete'; + + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new ConcreteFileDumper(); + $dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%'); + $dumper->dump($catalogue, array('path' => $tempDir)); + + $this->assertTrue(file_exists($file)); + + @unlink($file); + @rmdir($translationsDir); + } +} + +class ConcreteFileDumper extends FileDumper +{ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + return ''; + } + + protected function getExtension() + { + return 'concrete'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php new file mode 100644 index 0000000..618783c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\IcuResFileDumper; + +class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new IcuResFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resourcebundle/res/en.res', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php new file mode 100644 index 0000000..d8ae4b5 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\IniFileDumper; + +class IniFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new IniFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.ini', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php new file mode 100644 index 0000000..27e9f4d --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php @@ -0,0 +1,38 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\JsonFileDumper; + +class JsonFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new JsonFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.json', $dumper->formatCatalogue($catalogue, 'messages')); + } + + public function testDumpWithCustomEncoding() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => '"bar"')); + + $dumper = new JsonFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.dump.json', $dumper->formatCatalogue($catalogue, 'messages', array('json_encoding' => JSON_HEX_QUOT))); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php new file mode 100644 index 0000000..c47656c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\MoFileDumper; + +class MoFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new MoFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.mo', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php new file mode 100644 index 0000000..d24cd2b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\PhpFileDumper; + +class PhpFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new PhpFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.php', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php new file mode 100644 index 0000000..445961a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\PoFileDumper; + +class PoFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new PoFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.po', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php new file mode 100644 index 0000000..690a4d0 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\QtFileDumper; + +class QtFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar'), 'resources'); + + $dumper = new QtFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.ts', $dumper->formatCatalogue($catalogue, 'resources')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php new file mode 100644 index 0000000..072b605 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php @@ -0,0 +1,89 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\XliffFileDumper; + +class XliffFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + 'key' => '', + 'key.with.cdata' => '<source> & <target>', + )); + $catalogue->setMetadata('foo', array('notes' => array(array('priority' => 1, 'from' => 'bar', 'content' => 'baz')))); + $catalogue->setMetadata('key', array('notes' => array(array('content' => 'baz'), array('content' => 'qux')))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-clean.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR')) + ); + } + + public function testFormatCatalogueXliff2() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + 'key' => '', + 'key.with.cdata' => '<source> & <target>', + )); + $catalogue->setMetadata('key', array('target-attributes' => array('order' => 1))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-2.0-clean.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR', 'xliff_version' => '2.0')) + ); + } + + public function testFormatCatalogueWithCustomToolInfo() + { + $options = array( + 'default_locale' => 'en_US', + 'tool_info' => array('tool-id' => 'foo', 'tool-name' => 'foo', 'tool-version' => '0.0', 'tool-company' => 'Foo'), + ); + + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-tool-info.xlf', + $dumper->formatCatalogue($catalogue, 'messages', $options) + ); + } + + public function testFormatCatalogueWithTargetAttributesMetadata() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + )); + $catalogue->setMetadata('foo', array('target-attributes' => array('state' => 'needs-translation'))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-target-attributes.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR')) + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php new file mode 100644 index 0000000..d6bb477 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php @@ -0,0 +1,46 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\YamlFileDumper; + +class YamlFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testTreeFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add( + array( + 'foo.bar1' => 'value1', + 'foo.bar2' => 'value2', + )); + + $dumper = new YamlFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages.yml', $dumper->formatCatalogue($catalogue, 'messages', array('as_tree' => true, 'inline' => 999))); + } + + public function testLinearFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add( + array( + 'foo.bar1' => 'value1', + 'foo.bar2' => 'value2', + )); + + $dumper = new YamlFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages_linear.yml', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/IdentityTranslatorTest.php b/public/system/storage/vendor/symfony/translation/Tests/IdentityTranslatorTest.php new file mode 100644 index 0000000..352dd31 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/IdentityTranslatorTest.php @@ -0,0 +1,95 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Translation\IdentityTranslator; + +class IdentityTranslatorTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getTransTests + */ + public function testTrans($expected, $id, $parameters) + { + $translator = new IdentityTranslator(); + + $this->assertEquals($expected, $translator->trans($id, $parameters)); + } + + /** + * @dataProvider getTransChoiceTests + */ + public function testTransChoiceWithExplicitLocale($expected, $id, $number, $parameters) + { + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters)); + } + + /** + * @dataProvider getTransChoiceTests + */ + public function testTransChoiceWithDefaultLocale($expected, $id, $number, $parameters) + { + \Locale::setDefault('en'); + + $translator = new IdentityTranslator(); + + $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters)); + } + + public function testGetSetLocale() + { + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $this->assertEquals('en', $translator->getLocale()); + } + + public function testGetLocaleReturnsDefaultLocaleIfNotSet() + { + // in order to test with "pt_BR" + IntlTestHelper::requireFullIntl($this); + + $translator = new IdentityTranslator(); + + \Locale::setDefault('en'); + $this->assertEquals('en', $translator->getLocale()); + + \Locale::setDefault('pt_BR'); + $this->assertEquals('pt_BR', $translator->getLocale()); + } + + public function getTransTests() + { + return array( + array('Symfony is great!', 'Symfony is great!', array()), + array('Symfony is awesome!', 'Symfony is %what%!', array('%what%' => 'awesome')), + ); + } + + public function getTransChoiceTests() + { + return array( + array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0, array('%count%' => 0)), + array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1, array('%count%' => 1)), + array('There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10, array('%count%' => 10)), + array('There are 0 apples', 'There is 1 apple|There are %count% apples', 0, array('%count%' => 0)), + array('There is 1 apple', 'There is 1 apple|There are %count% apples', 1, array('%count%' => 1)), + array('There are 10 apples', 'There is 1 apple|There are %count% apples', 10, array('%count%' => 10)), + // custom validation messages may be coded with a fixed value + array('There are 2 apples', 'There are 2 apples', 2, array('%count%' => 2)), + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/IntervalTest.php b/public/system/storage/vendor/symfony/translation/Tests/IntervalTest.php new file mode 100644 index 0000000..075c98b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/IntervalTest.php @@ -0,0 +1,48 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Translation\Interval; + +class IntervalTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getTests + */ + public function testTest($expected, $number, $interval) + { + $this->assertEquals($expected, Interval::test($number, $interval)); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testTestException() + { + Interval::test(1, 'foobar'); + } + + public function getTests() + { + return array( + array(true, 3, '{1,2, 3 ,4}'), + array(false, 10, '{1,2, 3 ,4}'), + array(false, 3, '[1,2]'), + array(true, 1, '[1,2]'), + array(true, 2, '[1,2]'), + array(false, 1, ']1,2['), + array(false, 2, ']1,2['), + array(true, log(0), '[-Inf,2['), + array(true, -log(0), '[-2,+Inf]'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php new file mode 100644 index 0000000..463d3b5 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php @@ -0,0 +1,60 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\CsvFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class CsvFileLoaderTest extends \PHPUnit_Framework_TestCase +{ + public function testLoad() + { + $loader = new CsvFileLoader(); + $resource = __DIR__.'/../fixtures/resources.csv'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new CsvFileLoader(); + $resource = __DIR__.'/../fixtures/empty.csv'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new CsvFileLoader(); + $resource = __DIR__.'/../fixtures/not-exists.csv'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadNonLocalResource() + { + $loader = new CsvFileLoader(); + $resource = 'http://example.com/resources.csv'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php new file mode 100644 index 0000000..888fb61 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php @@ -0,0 +1,64 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\IcuDatFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +/** + * @requires extension intl + */ +class IcuDatFileLoaderTest extends LocalizedTestCase +{ + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new IcuDatFileLoader(); + $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted/resources', 'es', 'domain2'); + } + + public function testDatEnglishLoad() + { + // bundled resource is build using pkgdata command which at least in ICU 4.2 comes in extremely! buggy form + // you must specify an temporary build directory which is not the same as current directory and + // MUST reside on the same partition. pkgdata -p resources -T /srv -d.packagelist.txt + $loader = new IcuDatFileLoader(); + $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('symfony' => 'Symfony 2 is great'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); + } + + public function testDatFrenchLoad() + { + $loader = new IcuDatFileLoader(); + $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; + $catalogue = $loader->load($resource, 'fr', 'domain1'); + + $this->assertEquals(array('symfony' => 'Symfony 2 est génial'), $catalogue->all('domain1')); + $this->assertEquals('fr', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new IcuDatFileLoader(); + $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php new file mode 100644 index 0000000..8d9ed19 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php @@ -0,0 +1,51 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\IcuResFileLoader; +use Symfony\Component\Config\Resource\DirectoryResource; + +/** + * @requires extension intl + */ +class IcuResFileLoaderTest extends LocalizedTestCase +{ + public function testLoad() + { + // resource is build using genrb command + $loader = new IcuResFileLoader(); + $resource = __DIR__.'/../fixtures/resourcebundle/res'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new DirectoryResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new IcuResFileLoader(); + $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new IcuResFileLoader(); + $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted', 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php new file mode 100644 index 0000000..1a5de0e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php @@ -0,0 +1,50 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\IniFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class IniFileLoaderTest extends \PHPUnit_Framework_TestCase +{ + public function testLoad() + { + $loader = new IniFileLoader(); + $resource = __DIR__.'/../fixtures/resources.ini'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new IniFileLoader(); + $resource = __DIR__.'/../fixtures/empty.ini'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new IniFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.ini'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php new file mode 100644 index 0000000..cd5d633 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php @@ -0,0 +1,61 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\JsonFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class JsonFileLoaderTest extends \PHPUnit_Framework_TestCase +{ + public function testLoad() + { + $loader = new JsonFileLoader(); + $resource = __DIR__.'/../fixtures/resources.json'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new JsonFileLoader(); + $resource = __DIR__.'/../fixtures/empty.json'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new JsonFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.json'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + * @expectedExceptionMessage Error parsing JSON - Syntax error, malformed JSON + */ + public function testParseException() + { + $loader = new JsonFileLoader(); + $resource = __DIR__.'/../fixtures/malformed.json'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php new file mode 100644 index 0000000..0d1fff7 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +abstract class LocalizedTestCase extends \PHPUnit_Framework_TestCase +{ + protected function setUp() + { + if (!extension_loaded('intl')) { + $this->markTestSkipped('Extension intl is required.'); + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php new file mode 100644 index 0000000..34078d0 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php @@ -0,0 +1,71 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\MoFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class MoFileLoaderTest extends \PHPUnit_Framework_TestCase +{ + public function testLoad() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/resources.mo'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadPlurals() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/plurals.mo'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'foos' => '{0} bar|{1} bars'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.mo'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/empty.mo'; + $loader->load($resource, 'en', 'domain1'); + } + + public function testLoadEmptyTranslation() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/empty-translation.mo'; + $catalogue = $loader->load($resource, 'en', 'message'); + + $this->assertEquals(array(), $catalogue->all('message')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php new file mode 100644 index 0000000..0816b0f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php @@ -0,0 +1,49 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\PhpFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase +{ + public function testLoad() + { + $loader = new PhpFileLoader(); + $resource = __DIR__.'/../fixtures/resources.php'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new PhpFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.php'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadThrowsAnExceptionIfFileNotLocal() + { + $loader = new PhpFileLoader(); + $resource = 'http://example.com/resources.php'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php new file mode 100644 index 0000000..5d340c7 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php @@ -0,0 +1,108 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\PoFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class PoFileLoaderTest extends \PHPUnit_Framework_TestCase +{ + public function testLoad() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/resources.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadPlurals() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/plurals.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'foos' => 'bar|bars'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/empty.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.po'; + $loader->load($resource, 'en', 'domain1'); + } + + public function testLoadEmptyTranslation() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/empty-translation.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => ''), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testEscapedId() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/escaped-id.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $messages = $catalogue->all('domain1'); + $this->assertArrayHasKey('escaped "foo"', $messages); + $this->assertEquals('escaped "bar"', $messages['escaped "foo"']); + } + + public function testEscapedIdPlurals() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/escaped-id-plurals.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $messages = $catalogue->all('domain1'); + $this->assertArrayHasKey('escaped "foo"', $messages); + $this->assertArrayHasKey('escaped "foos"', $messages); + $this->assertEquals('escaped "bar"', $messages['escaped "foo"']); + $this->assertEquals('escaped "bar"|escaped "bars"', $messages['escaped "foos"']); + } + + public function testSkipFuzzyTranslations() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/fuzzy-translations.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $messages = $catalogue->all('domain1'); + $this->assertArrayHasKey('foo1', $messages); + $this->assertArrayNotHasKey('foo2', $messages); + $this->assertArrayHasKey('foo3', $messages); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php new file mode 100644 index 0000000..3aca86a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php @@ -0,0 +1,67 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\QtFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class QtFileLoaderTest extends \PHPUnit_Framework_TestCase +{ + public function testLoad() + { + $loader = new QtFileLoader(); + $resource = __DIR__.'/../fixtures/resources.ts'; + $catalogue = $loader->load($resource, 'en', 'resources'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('resources')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new QtFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.ts'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadNonLocalResource() + { + $loader = new QtFileLoader(); + $resource = 'http://domain1.com/resources.ts'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new QtFileLoader(); + $resource = __DIR__.'/../fixtures/invalid-xml-resources.xlf'; + $loader->load($resource, 'en', 'domain1'); + } + + public function testLoadEmptyResource() + { + $loader = new QtFileLoader(); + $resource = __DIR__.'/../fixtures/empty.xlf'; + $this->setExpectedException('Symfony\Component\Translation\Exception\InvalidResourceException', sprintf('Unable to load "%s".', $resource)); + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php new file mode 100644 index 0000000..2f466d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php @@ -0,0 +1,183 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\XliffFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class XliffFileLoaderTest extends \PHPUnit_Framework_TestCase +{ + public function testLoad() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertSame(array(), libxml_get_errors()); + $this->assertContainsOnly('string', $catalogue->all('domain1')); + } + + public function testLoadWithInternalErrorsEnabled() + { + $internalErrors = libxml_use_internal_errors(true); + + $this->assertSame(array(), libxml_get_errors()); + + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertSame(array(), libxml_get_errors()); + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + } + + public function testLoadWithExternalEntitiesDisabled() + { + $disableEntities = libxml_disable_entity_loader(true); + + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + libxml_disable_entity_loader($disableEntities); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadWithResname() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/resname.xlf', 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo'), $catalogue->all('domain1')); + } + + public function testIncompleteResource() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/resources.xlf', 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'extra' => 'extra', 'key' => '', 'test' => 'with'), $catalogue->all('domain1')); + } + + public function testEncoding() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/encoding.xlf', 'en', 'domain1'); + + $this->assertEquals(utf8_decode('föö'), $catalogue->get('bar', 'domain1')); + $this->assertEquals(utf8_decode('bär'), $catalogue->get('foo', 'domain1')); + $this->assertEquals(array('notes' => array(array('content' => utf8_decode('bäz')))), $catalogue->getMetadata('foo', 'domain1')); + } + + public function testTargetAttributesAreStoredCorrectly() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/with-attributes.xlf', 'en', 'domain1'); + + $metadata = $catalogue->getMetadata('foo', 'domain1'); + $this->assertEquals('translated', $metadata['target-attributes']['state']); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new XliffFileLoader(); + $loader->load(__DIR__.'/../fixtures/resources.php', 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadResourceDoesNotValidate() + { + $loader = new XliffFileLoader(); + $loader->load(__DIR__.'/../fixtures/non-valid.xlf', 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.xlf'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadThrowsAnExceptionIfFileNotLocal() + { + $loader = new XliffFileLoader(); + $resource = 'http://example.com/resources.xlf'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + * @expectedExceptionMessage Document types are not allowed. + */ + public function testDocTypeIsNotAllowed() + { + $loader = new XliffFileLoader(); + $loader->load(__DIR__.'/../fixtures/withdoctype.xlf', 'en', 'domain1'); + } + + public function testParseEmptyFile() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/empty.xlf'; + $this->setExpectedException('Symfony\Component\Translation\Exception\InvalidResourceException', sprintf('Unable to load "%s":', $resource)); + $loader->load($resource, 'en', 'domain1'); + } + + public function testLoadNotes() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/withnote.xlf', 'en', 'domain1'); + + $this->assertEquals(array('notes' => array(array('priority' => 1, 'content' => 'foo'))), $catalogue->getMetadata('foo', 'domain1')); + // message without target + $this->assertEquals(array('notes' => array(array('content' => 'bar', 'from' => 'foo'))), $catalogue->getMetadata('extra', 'domain1')); + // message with empty target + $this->assertEquals(array('notes' => array(array('content' => 'baz'), array('priority' => 2, 'from' => 'bar', 'content' => 'qux'))), $catalogue->getMetadata('key', 'domain1')); + } + + public function testLoadVersion2() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources-2.0.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertSame(array(), libxml_get_errors()); + + $domains = $catalogue->all(); + $this->assertCount(3, $domains['domain1']); + $this->assertContainsOnly('string', $catalogue->all('domain1')); + + // target attributes + $this->assertEquals(array('target-attributes' => array('order' => 1)), $catalogue->getMetadata('bar', 'domain1')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php new file mode 100644 index 0000000..00f7163 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php @@ -0,0 +1,70 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\YamlFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase +{ + public function testLoad() + { + $loader = new YamlFileLoader(); + $resource = __DIR__.'/../fixtures/resources.yml'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new YamlFileLoader(); + $resource = __DIR__.'/../fixtures/empty.yml'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new YamlFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.yml'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadThrowsAnExceptionIfFileNotLocal() + { + $loader = new YamlFileLoader(); + $resource = 'http://example.com/resources.yml'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadThrowsAnExceptionIfNotAnArray() + { + $loader = new YamlFileLoader(); + $resource = __DIR__.'/../fixtures/non-valid.yml'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/LoggingTranslatorTest.php b/public/system/storage/vendor/symfony/translation/Tests/LoggingTranslatorTest.php new file mode 100644 index 0000000..9f3e849 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/LoggingTranslatorTest.php @@ -0,0 +1,49 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\LoggingTranslator; +use Symfony\Component\Translation\Loader\ArrayLoader; + +class LoggingTranslatorTest extends \PHPUnit_Framework_TestCase +{ + public function testTransWithNoTranslationIsLogged() + { + $logger = $this->getMock('Psr\Log\LoggerInterface'); + $logger->expects($this->exactly(2)) + ->method('warning') + ->with('Translation not found.') + ; + + $translator = new Translator('ar'); + $loggableTranslator = new LoggingTranslator($translator, $logger); + $loggableTranslator->transChoice('some_message2', 10, array('%count%' => 10)); + $loggableTranslator->trans('bar'); + } + + public function testTransChoiceFallbackIsLogged() + { + $logger = $this->getMock('Psr\Log\LoggerInterface'); + $logger->expects($this->once()) + ->method('debug') + ->with('Translation use fallback catalogue.') + ; + + $translator = new Translator('ar'); + $translator->setFallbackLocales(array('en')); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en'); + $loggableTranslator = new LoggingTranslator($translator, $logger); + $loggableTranslator->transChoice('some_message2', 10, array('%count%' => 10)); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/MessageCatalogueTest.php b/public/system/storage/vendor/symfony/translation/Tests/MessageCatalogueTest.php new file mode 100644 index 0000000..6f55b8c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/MessageCatalogueTest.php @@ -0,0 +1,214 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Translation\MessageCatalogue; + +class MessageCatalogueTest extends \PHPUnit_Framework_TestCase +{ + public function testGetLocale() + { + $catalogue = new MessageCatalogue('en'); + + $this->assertEquals('en', $catalogue->getLocale()); + } + + public function testGetDomains() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array(), 'domain2' => array())); + + $this->assertEquals(array('domain1', 'domain2'), $catalogue->getDomains()); + } + + public function testAll() + { + $catalogue = new MessageCatalogue('en', $messages = array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + + $this->assertEquals(array('foo' => 'foo'), $catalogue->all('domain1')); + $this->assertEquals(array(), $catalogue->all('domain88')); + $this->assertEquals($messages, $catalogue->all()); + } + + public function testHas() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + + $this->assertTrue($catalogue->has('foo', 'domain1')); + $this->assertFalse($catalogue->has('bar', 'domain1')); + $this->assertFalse($catalogue->has('foo', 'domain88')); + } + + public function testGetSet() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->set('foo1', 'foo1', 'domain1'); + + $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + } + + public function testAdd() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->add(array('foo1' => 'foo1'), 'domain1'); + + $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + + $catalogue->add(array('foo' => 'bar'), 'domain1'); + $this->assertEquals('bar', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + + $catalogue->add(array('foo' => 'bar'), 'domain88'); + $this->assertEquals('bar', $catalogue->get('foo', 'domain88')); + } + + public function testReplace() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->replace($messages = array('foo1' => 'foo1'), 'domain1'); + + $this->assertEquals($messages, $catalogue->all('domain1')); + } + + public function testAddCatalogue() + { + $r = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); + $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); + + $r1 = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); + $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); + + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->addResource($r); + + $catalogue1 = new MessageCatalogue('en', array('domain1' => array('foo1' => 'foo1'))); + $catalogue1->addResource($r1); + + $catalogue->addCatalogue($catalogue1); + + $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + + $this->assertEquals(array($r, $r1), $catalogue->getResources()); + } + + public function testAddFallbackCatalogue() + { + $r = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); + $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); + + $r1 = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); + $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); + + $catalogue = new MessageCatalogue('en_US', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->addResource($r); + + $catalogue1 = new MessageCatalogue('en', array('domain1' => array('foo' => 'bar', 'foo1' => 'foo1'))); + $catalogue1->addResource($r1); + + $catalogue->addFallbackCatalogue($catalogue1); + + $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + + $this->assertEquals(array($r, $r1), $catalogue->getResources()); + } + + /** + * @expectedException \LogicException + */ + public function testAddFallbackCatalogueWithParentCircularReference() + { + $main = new MessageCatalogue('en_US'); + $fallback = new MessageCatalogue('fr_FR'); + + $fallback->addFallbackCatalogue($main); + $main->addFallbackCatalogue($fallback); + } + + /** + * @expectedException \LogicException + */ + public function testAddFallbackCatalogueWithFallbackCircularReference() + { + $fr = new MessageCatalogue('fr'); + $en = new MessageCatalogue('en'); + $es = new MessageCatalogue('es'); + + $fr->addFallbackCatalogue($en); + $es->addFallbackCatalogue($en); + $en->addFallbackCatalogue($fr); + } + + /** + * @expectedException \LogicException + */ + public function testAddCatalogueWhenLocaleIsNotTheSameAsTheCurrentOne() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->addCatalogue(new MessageCatalogue('fr', array())); + } + + public function testGetAddResource() + { + $catalogue = new MessageCatalogue('en'); + $r = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); + $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); + $catalogue->addResource($r); + $catalogue->addResource($r); + $r1 = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); + $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); + $catalogue->addResource($r1); + + $this->assertEquals(array($r, $r1), $catalogue->getResources()); + } + + public function testMetadataDelete() + { + $catalogue = new MessageCatalogue('en'); + $this->assertEquals(array(), $catalogue->getMetadata('', ''), 'Metadata is empty'); + $catalogue->deleteMetadata('key', 'messages'); + $catalogue->deleteMetadata('', 'messages'); + $catalogue->deleteMetadata(); + } + + public function testMetadataSetGetDelete() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->setMetadata('key', 'value'); + $this->assertEquals('value', $catalogue->getMetadata('key', 'messages'), "Metadata 'key' = 'value'"); + + $catalogue->setMetadata('key2', array()); + $this->assertEquals(array(), $catalogue->getMetadata('key2', 'messages'), 'Metadata key2 is array'); + + $catalogue->deleteMetadata('key2', 'messages'); + $this->assertNull($catalogue->getMetadata('key2', 'messages'), 'Metadata key2 should is deleted.'); + + $catalogue->deleteMetadata('key2', 'domain'); + $this->assertNull($catalogue->getMetadata('key2', 'domain'), 'Metadata key2 should is deleted.'); + } + + public function testMetadataMerge() + { + $cat1 = new MessageCatalogue('en'); + $cat1->setMetadata('a', 'b'); + $this->assertEquals(array('messages' => array('a' => 'b')), $cat1->getMetadata('', ''), 'Cat1 contains messages metadata.'); + + $cat2 = new MessageCatalogue('en'); + $cat2->setMetadata('b', 'c', 'domain'); + $this->assertEquals(array('domain' => array('b' => 'c')), $cat2->getMetadata('', ''), 'Cat2 contains domain metadata.'); + + $cat1->addCatalogue($cat2); + $this->assertEquals(array('messages' => array('a' => 'b'), 'domain' => array('b' => 'c')), $cat1->getMetadata('', ''), 'Cat1 contains merged metadata.'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/MessageSelectorTest.php b/public/system/storage/vendor/symfony/translation/Tests/MessageSelectorTest.php new file mode 100644 index 0000000..f89bed1 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/MessageSelectorTest.php @@ -0,0 +1,130 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Translation\MessageSelector; + +class MessageSelectorTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getChooseTests + */ + public function testChoose($expected, $id, $number) + { + $selector = new MessageSelector(); + + $this->assertEquals($expected, $selector->choose($id, $number, 'en')); + } + + public function testReturnMessageIfExactlyOneStandardRuleIsGiven() + { + $selector = new MessageSelector(); + + $this->assertEquals('There are two apples', $selector->choose('There are two apples', 2, 'en')); + } + + /** + * @dataProvider getNonMatchingMessages + * @expectedException \InvalidArgumentException + */ + public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number) + { + $selector = new MessageSelector(); + + $selector->choose($id, $number, 'en'); + } + + public function getNonMatchingMessages() + { + return array( + array('{0} There are no apples|{1} There is one apple', 2), + array('{1} There is one apple|]1,Inf] There are %count% apples', 0), + array('{1} There is one apple|]2,Inf] There are %count% apples', 2), + array('{0} There are no apples|There is one apple', 2), + ); + } + + public function getChooseTests() + { + return array( + array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), + array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), + array('There are no apples', '{0}There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), + + array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1), + + array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), + array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf]There are %count% apples', 10), + array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), + + array('There are %count% apples', 'There is one apple|There are %count% apples', 0), + array('There is one apple', 'There is one apple|There are %count% apples', 1), + array('There are %count% apples', 'There is one apple|There are %count% apples', 10), + + array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 0), + array('There is one apple', 'one: There is one apple|more: There are %count% apples', 1), + array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 10), + + array('There are no apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 0), + array('There is one apple', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 1), + array('There are %count% apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 10), + + array('', '{0}|{1} There is one apple|]1,Inf] There are %count% apples', 0), + array('', '{0} There are no apples|{1}|]1,Inf] There are %count% apples', 1), + + // Indexed only tests which are Gettext PoFile* compatible strings. + array('There are %count% apples', 'There is one apple|There are %count% apples', 0), + array('There is one apple', 'There is one apple|There are %count% apples', 1), + array('There are %count% apples', 'There is one apple|There are %count% apples', 2), + + // Tests for float numbers + array('There is almost one apple', '{0} There are no apples|]0,1[ There is almost one apple|{1} There is one apple|[1,Inf] There is more than one apple', 0.7), + array('There is one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1), + array('There is more than one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1.7), + array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), + array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0), + array('There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), + + // Test texts with new-lines + // with double-quotes and \n in id & double-quotes and actual newlines in text + array("This is a text with a\n new-line in it. Selector = 0.", '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 0), + // with double-quotes and \n in id and single-quotes and actual newlines in text + array("This is a text with a\n new-line in it. Selector = 1.", '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 1), + array("This is a text with a\n new-line in it. Selector > 1.", '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 5), + // with double-quotes and id split accros lines + array('This is a text with a + new-line in it. Selector = 1.', '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 1), + // with single-quotes and id split accros lines + array('This is a text with a + new-line in it. Selector > 1.', '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 5), + // with single-quotes and \n in text + array('This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0), + // with double-quotes and id split accros lines + array("This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1), + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/PluralizationRulesTest.php b/public/system/storage/vendor/symfony/translation/Tests/PluralizationRulesTest.php new file mode 100644 index 0000000..78bbc87 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/PluralizationRulesTest.php @@ -0,0 +1,123 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Translation\PluralizationRules; + +/** + * Test should cover all languages mentioned on http://translate.sourceforge.net/wiki/l10n/pluralforms + * and Plural forms mentioned on http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms. + * + * See also https://developer.mozilla.org/en/Localization_and_Plurals which mentions 15 rules having a maximum of 6 forms. + * The mozilla code is also interesting to check for. + * + * As mentioned by chx http://drupal.org/node/1273968 we can cover all by testing number from 0 to 199 + * + * The goal to cover all languages is to far fetched so this test case is smaller. + * + * @author Clemens Tolboom clemens@build2be.nl + */ +class PluralizationRulesTest extends \PHPUnit_Framework_TestCase +{ + /** + * We test failed langcode here. + * + * TODO: The languages mentioned in the data provide need to get fixed somehow within PluralizationRules. + * + * @dataProvider failingLangcodes + */ + public function testFailedLangcodes($nplural, $langCodes) + { + $matrix = $this->generateTestData($langCodes); + $this->validateMatrix($nplural, $matrix, false); + } + + /** + * @dataProvider successLangcodes + */ + public function testLangcodes($nplural, $langCodes) + { + $matrix = $this->generateTestData($langCodes); + $this->validateMatrix($nplural, $matrix); + } + + /** + * This array should contain all currently known langcodes. + * + * As it is impossible to have this ever complete we should try as hard as possible to have it almost complete. + * + * @return array + */ + public function successLangcodes() + { + return array( + array('1', array('ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky')), + array('2', array('nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM')), + array('3', array('be', 'bs', 'cs', 'hr')), + array('4', array('cy', 'mt', 'sl')), + array('5', array()), + array('6', array('ar')), + ); + } + + /** + * This array should be at least empty within the near future. + * + * This both depends on a complete list trying to add above as understanding + * the plural rules of the current failing languages. + * + * @return array with nplural together with langcodes + */ + public function failingLangcodes() + { + return array( + array('1', array('fa')), + array('2', array('jbo')), + array('3', array('cbs')), + array('4', array('gd', 'kw')), + array('5', array('ga')), + array('6', array()), + ); + } + + /** + * We validate only on the plural coverage. Thus the real rules is not tested. + * + * @param string $nplural plural expected + * @param array $matrix containing langcodes and their plural index values + * @param bool $expectSuccess + */ + protected function validateMatrix($nplural, $matrix, $expectSuccess = true) + { + foreach ($matrix as $langCode => $data) { + $indexes = array_flip($data); + if ($expectSuccess) { + $this->assertEquals($nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + } else { + $this->assertNotEquals((int) $nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + } + } + } + + protected function generateTestData($langCodes) + { + $matrix = array(); + foreach ($langCodes as $langCode) { + for ($count = 0; $count < 200; ++$count) { + $plural = PluralizationRules::get($count, $langCode); + $matrix[$langCode][$count] = $plural; + } + } + + return $matrix; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/TranslatorCacheTest.php b/public/system/storage/vendor/symfony/translation/Tests/TranslatorCacheTest.php new file mode 100644 index 0000000..7509358 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/TranslatorCacheTest.php @@ -0,0 +1,299 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Config\Resource\SelfCheckingResourceInterface; +use Symfony\Component\Translation\Loader\ArrayLoader; +use Symfony\Component\Translation\Loader\LoaderInterface; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\MessageCatalogue; + +class TranslatorCacheTest extends \PHPUnit_Framework_TestCase +{ + protected $tmpDir; + + protected function setUp() + { + $this->tmpDir = sys_get_temp_dir().'/sf2_translation'; + $this->deleteTmpDir(); + } + + protected function tearDown() + { + $this->deleteTmpDir(); + } + + protected function deleteTmpDir() + { + if (!file_exists($dir = $this->tmpDir)) { + return; + } + + $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->tmpDir), \RecursiveIteratorIterator::CHILD_FIRST); + foreach ($iterator as $path) { + if (preg_match('#[/\\\\]\.\.?$#', $path->__toString())) { + continue; + } + if ($path->isDir()) { + rmdir($path->__toString()); + } else { + unlink($path->__toString()); + } + } + rmdir($this->tmpDir); + } + + /** + * @dataProvider runForDebugAndProduction + */ + public function testThatACacheIsUsed($debug) + { + $locale = 'any_locale'; + $format = 'some_format'; + $msgid = 'test'; + + // Prime the cache + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, new ArrayLoader()); + $translator->addResource($format, array($msgid => 'OK'), $locale); + $translator->trans($msgid); + + // Try again and see we get a valid result whilst no loader can be used + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, $this->createFailingLoader()); + $translator->addResource($format, array($msgid => 'OK'), $locale); + $this->assertEquals('OK', $translator->trans($msgid), '-> caching does not work in '.($debug ? 'debug' : 'production')); + } + + public function testCatalogueIsReloadedWhenResourcesAreNoLongerFresh() + { + /* + * The testThatACacheIsUsed() test showed that we don't need the loader as long as the cache + * is fresh. + * + * Now we add a Resource that is never fresh and make sure that the + * cache is discarded (the loader is called twice). + * + * We need to run this for debug=true only because in production the cache + * will never be revalidated. + */ + + $locale = 'any_locale'; + $format = 'some_format'; + $msgid = 'test'; + + $catalogue = new MessageCatalogue($locale, array()); + $catalogue->addResource(new StaleResource()); // better use a helper class than a mock, because it gets serialized in the cache and re-loaded + + /** @var LoaderInterface|\PHPUnit_Framework_MockObject_MockObject $loader */ + $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); + $loader + ->expects($this->exactly(2)) + ->method('load') + ->will($this->returnValue($catalogue)) + ; + + // 1st pass + $translator = new Translator($locale, null, $this->tmpDir, true); + $translator->addLoader($format, $loader); + $translator->addResource($format, null, $locale); + $translator->trans($msgid); + + // 2nd pass + $translator = new Translator($locale, null, $this->tmpDir, true); + $translator->addLoader($format, $loader); + $translator->addResource($format, null, $locale); + $translator->trans($msgid); + } + + /** + * @dataProvider runForDebugAndProduction + */ + public function testDifferentTranslatorsForSameLocaleDoNotOverwriteEachOthersCache($debug) + { + /* + * Similar to the previous test. After we used the second translator, make + * sure there's still a useable cache for the first one. + */ + + $locale = 'any_locale'; + $format = 'some_format'; + $msgid = 'test'; + + // Create a Translator and prime its cache + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, new ArrayLoader()); + $translator->addResource($format, array($msgid => 'OK'), $locale); + $translator->trans($msgid); + + // Create another Translator with a different catalogue for the same locale + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, new ArrayLoader()); + $translator->addResource($format, array($msgid => 'FAIL'), $locale); + $translator->trans($msgid); + + // Now the first translator must still have a useable cache. + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, $this->createFailingLoader()); + $translator->addResource($format, array($msgid => 'OK'), $locale); + $this->assertEquals('OK', $translator->trans($msgid), '-> the cache was overwritten by another translator instance in '.($debug ? 'debug' : 'production')); + } + + public function testDifferentCacheFilesAreUsedForDifferentSetsOfFallbackLocales() + { + /* + * Because the cache file contains a catalogue including all of its fallback + * catalogues, we must take the set of fallback locales into consideration when + * loading a catalogue from the cache. + */ + $translator = new Translator('a', null, $this->tmpDir); + $translator->setFallbackLocales(array('b')); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); + $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + + $this->assertEquals('bar (b)', $translator->trans('bar')); + + // Remove fallback locale + $translator->setFallbackLocales(array()); + $this->assertEquals('bar', $translator->trans('bar')); + + // Use a fresh translator with no fallback locales, result should be the same + $translator = new Translator('a', null, $this->tmpDir); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); + $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + + $this->assertEquals('bar', $translator->trans('bar')); + } + + public function testPrimaryAndFallbackCataloguesContainTheSameMessagesRegardlessOfCaching() + { + /* + * As a safeguard against potential BC breaks, make sure that primary and fallback + * catalogues (reachable via getFallbackCatalogue()) always contain the full set of + * messages provided by the loader. This must also be the case when these catalogues + * are (internally) read from a cache. + * + * Optimizations inside the translator must not change this behaviour. + */ + + /* + * Create a translator that loads two catalogues for two different locales. + * The catalogues contain distinct sets of messages. + */ + $translator = new Translator('a', null, $this->tmpDir); + $translator->setFallbackLocales(array('b')); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); + $translator->addResource('array', array('foo' => 'foo (b)'), 'b'); + $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + + $catalogue = $translator->getCatalogue('a'); + $this->assertFalse($catalogue->defines('bar')); // Sure, the "a" catalogue does not contain that message. + + $fallback = $catalogue->getFallbackCatalogue(); + $this->assertTrue($fallback->defines('foo')); // "foo" is present in "a" and "b" + + /* + * Now, repeat the same test. + * Behind the scenes, the cache is used. But that should not matter, right? + */ + $translator = new Translator('a', null, $this->tmpDir); + $translator->setFallbackLocales(array('b')); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); + $translator->addResource('array', array('foo' => 'foo (b)'), 'b'); + $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + + $catalogue = $translator->getCatalogue('a'); + $this->assertFalse($catalogue->defines('bar')); + + $fallback = $catalogue->getFallbackCatalogue(); + $this->assertTrue($fallback->defines('foo')); + } + + public function testRefreshCacheWhenResourcesAreNoLongerFresh() + { + $resource = $this->getMock('Symfony\Component\Config\Resource\SelfCheckingResourceInterface'); + $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); + $resource->method('isFresh')->will($this->returnValue(false)); + $loader + ->expects($this->exactly(2)) + ->method('load') + ->will($this->returnValue($this->getCatalogue('fr', array(), array($resource)))); + + // prime the cache + $translator = new Translator('fr', null, $this->tmpDir, true); + $translator->addLoader('loader', $loader); + $translator->addResource('loader', 'foo', 'fr'); + $translator->trans('foo'); + + // prime the cache second time + $translator = new Translator('fr', null, $this->tmpDir, true); + $translator->addLoader('loader', $loader); + $translator->addResource('loader', 'foo', 'fr'); + $translator->trans('foo'); + } + + protected function getCatalogue($locale, $messages, $resources = array()) + { + $catalogue = new MessageCatalogue($locale); + foreach ($messages as $key => $translation) { + $catalogue->set($key, $translation); + } + foreach ($resources as $resource) { + $catalogue->addResource($resource); + } + + return $catalogue; + } + + public function runForDebugAndProduction() + { + return array(array(true), array(false)); + } + + /** + * @return LoaderInterface + */ + private function createFailingLoader() + { + $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); + $loader + ->expects($this->never()) + ->method('load'); + + return $loader; + } +} + +class StaleResource implements SelfCheckingResourceInterface +{ + public function isFresh($timestamp) + { + return false; + } + + public function getResource() + { + } + + public function __toString() + { + return ''; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/TranslatorTest.php b/public/system/storage/vendor/symfony/translation/Tests/TranslatorTest.php new file mode 100644 index 0000000..0f65d3e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/TranslatorTest.php @@ -0,0 +1,533 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\MessageSelector; +use Symfony\Component\Translation\Loader\ArrayLoader; +use Symfony\Component\Translation\MessageCatalogue; + +class TranslatorTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \InvalidArgumentException + */ + public function testConstructorInvalidLocale($locale) + { + $translator = new Translator($locale, new MessageSelector()); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testConstructorValidLocale($locale) + { + $translator = new Translator($locale, new MessageSelector()); + + $this->assertEquals($locale, $translator->getLocale()); + } + + public function testConstructorWithoutLocale() + { + $translator = new Translator(null, new MessageSelector()); + + $this->assertNull($translator->getLocale()); + } + + public function testSetGetLocale() + { + $translator = new Translator('en'); + + $this->assertEquals('en', $translator->getLocale()); + + $translator->setLocale('fr'); + $this->assertEquals('fr', $translator->getLocale()); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \InvalidArgumentException + */ + public function testSetInvalidLocale($locale) + { + $translator = new Translator('fr', new MessageSelector()); + $translator->setLocale($locale); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testSetValidLocale($locale) + { + $translator = new Translator($locale, new MessageSelector()); + $translator->setLocale($locale); + + $this->assertEquals($locale, $translator->getLocale()); + } + + public function testGetCatalogue() + { + $translator = new Translator('en'); + + $this->assertEquals(new MessageCatalogue('en'), $translator->getCatalogue()); + + $translator->setLocale('fr'); + $this->assertEquals(new MessageCatalogue('fr'), $translator->getCatalogue('fr')); + } + + public function testGetCatalogueReturnsConsolidatedCatalogue() + { + /* + * This will be useful once we refactor so that different domains will be loaded lazily (on-demand). + * In that case, getCatalogue() will probably have to load all missing domains in order to return + * one complete catalogue. + */ + + $locale = 'whatever'; + $translator = new Translator($locale); + $translator->addLoader('loader-a', new ArrayLoader()); + $translator->addLoader('loader-b', new ArrayLoader()); + $translator->addResource('loader-a', array('foo' => 'foofoo'), $locale, 'domain-a'); + $translator->addResource('loader-b', array('bar' => 'foobar'), $locale, 'domain-b'); + + /* + * Test that we get a single catalogue comprising messages + * from different loaders and different domains + */ + $catalogue = $translator->getCatalogue($locale); + $this->assertTrue($catalogue->defines('foo', 'domain-a')); + $this->assertTrue($catalogue->defines('bar', 'domain-b')); + } + + public function testSetFallbackLocales() + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + $translator->addResource('array', array('bar' => 'foobar'), 'fr'); + + // force catalogue loading + $translator->trans('bar'); + + $translator->setFallbackLocales(array('fr')); + $this->assertEquals('foobar', $translator->trans('bar')); + } + + public function testSetFallbackLocalesMultiple() + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (en)'), 'en'); + $translator->addResource('array', array('bar' => 'bar (fr)'), 'fr'); + + // force catalogue loading + $translator->trans('bar'); + + $translator->setFallbackLocales(array('fr_FR', 'fr')); + $this->assertEquals('bar (fr)', $translator->trans('bar')); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \InvalidArgumentException + */ + public function testSetFallbackInvalidLocales($locale) + { + $translator = new Translator('fr', new MessageSelector()); + $translator->setFallbackLocales(array('fr', $locale)); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testSetFallbackValidLocales($locale) + { + $translator = new Translator($locale, new MessageSelector()); + $translator->setFallbackLocales(array('fr', $locale)); + // no assertion. this method just asserts that no exception is thrown + } + + public function testTransWithFallbackLocale() + { + $translator = new Translator('fr_FR'); + $translator->setFallbackLocales(array('en')); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('bar' => 'foobar'), 'en'); + + $this->assertEquals('foobar', $translator->trans('bar')); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \InvalidArgumentException + */ + public function testAddResourceInvalidLocales($locale) + { + $translator = new Translator('fr', new MessageSelector()); + $translator->addResource('array', array('foo' => 'foofoo'), $locale); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testAddResourceValidLocales($locale) + { + $translator = new Translator('fr', new MessageSelector()); + $translator->addResource('array', array('foo' => 'foofoo'), $locale); + // no assertion. this method just asserts that no exception is thrown + } + + public function testAddResourceAfterTrans() + { + $translator = new Translator('fr'); + $translator->addLoader('array', new ArrayLoader()); + + $translator->setFallbackLocales(array('en')); + + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + $this->assertEquals('foofoo', $translator->trans('foo')); + + $translator->addResource('array', array('bar' => 'foobar'), 'en'); + $this->assertEquals('foobar', $translator->trans('bar')); + } + + /** + * @dataProvider getTransFileTests + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testTransWithoutFallbackLocaleFile($format, $loader) + { + $loaderClass = 'Symfony\\Component\\Translation\\Loader\\'.$loader; + $translator = new Translator('en'); + $translator->addLoader($format, new $loaderClass()); + $translator->addResource($format, __DIR__.'/fixtures/non-existing', 'en'); + $translator->addResource($format, __DIR__.'/fixtures/resources.'.$format, 'en'); + + // force catalogue loading + $translator->trans('foo'); + } + + /** + * @dataProvider getTransFileTests + */ + public function testTransWithFallbackLocaleFile($format, $loader) + { + $loaderClass = 'Symfony\\Component\\Translation\\Loader\\'.$loader; + $translator = new Translator('en_GB'); + $translator->addLoader($format, new $loaderClass()); + $translator->addResource($format, __DIR__.'/fixtures/non-existing', 'en_GB'); + $translator->addResource($format, __DIR__.'/fixtures/resources.'.$format, 'en', 'resources'); + + $this->assertEquals('bar', $translator->trans('foo', array(), 'resources')); + } + + public function testTransWithFallbackLocaleBis() + { + $translator = new Translator('en_US'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en_US'); + $translator->addResource('array', array('bar' => 'foobar'), 'en'); + $this->assertEquals('foobar', $translator->trans('bar')); + } + + public function testTransWithFallbackLocaleTer() + { + $translator = new Translator('fr_FR'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (en_US)'), 'en_US'); + $translator->addResource('array', array('bar' => 'bar (en)'), 'en'); + + $translator->setFallbackLocales(array('en_US', 'en')); + + $this->assertEquals('foo (en_US)', $translator->trans('foo')); + $this->assertEquals('bar (en)', $translator->trans('bar')); + } + + public function testTransNonExistentWithFallback() + { + $translator = new Translator('fr'); + $translator->setFallbackLocales(array('en')); + $translator->addLoader('array', new ArrayLoader()); + $this->assertEquals('non-existent', $translator->trans('non-existent')); + } + + /** + * @expectedException \RuntimeException + */ + public function testWhenAResourceHasNoRegisteredLoader() + { + $translator = new Translator('en'); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + + $translator->trans('foo'); + } + + public function testFallbackCatalogueResources() + { + $translator = new Translator('en_GB', new MessageSelector()); + $translator->addLoader('yml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); + $translator->addResource('yml', __DIR__.'/fixtures/empty.yml', 'en_GB'); + $translator->addResource('yml', __DIR__.'/fixtures/resources.yml', 'en'); + + // force catalogue loading + $this->assertEquals('bar', $translator->trans('foo', array())); + + $resources = $translator->getCatalogue('en')->getResources(); + $this->assertCount(1, $resources); + $this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources); + + $resources = $translator->getCatalogue('en_GB')->getResources(); + $this->assertCount(2, $resources); + $this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'empty.yml', $resources); + $this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources); + } + + /** + * @dataProvider getTransTests + */ + public function testTrans($expected, $id, $translation, $parameters, $locale, $domain) + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array((string) $id => $translation), $locale, $domain); + + $this->assertEquals($expected, $translator->trans($id, $parameters, $domain, $locale)); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \InvalidArgumentException + */ + public function testTransInvalidLocale($locale) + { + $translator = new Translator('en', new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + + $translator->trans('foo', array(), '', $locale); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testTransValidLocale($locale) + { + $translator = new Translator($locale, new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('test' => 'OK'), $locale); + + $this->assertEquals('OK', $translator->trans('test')); + $this->assertEquals('OK', $translator->trans('test', array(), null, $locale)); + } + + /** + * @dataProvider getFlattenedTransTests + */ + public function testFlattenedTrans($expected, $messages, $id) + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', $messages, 'fr', ''); + + $this->assertEquals($expected, $translator->trans($id, array(), '', 'fr')); + } + + /** + * @dataProvider getTransChoiceTests + */ + public function testTransChoice($expected, $id, $translation, $number, $parameters, $locale, $domain) + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array((string) $id => $translation), $locale, $domain); + + $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters, $domain, $locale)); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \InvalidArgumentException + */ + public function testTransChoiceInvalidLocale($locale) + { + $translator = new Translator('en', new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + + $translator->transChoice('foo', 1, array(), '', $locale); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testTransChoiceValidLocale($locale) + { + $translator = new Translator('en', new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + + $translator->transChoice('foo', 1, array(), '', $locale); + // no assertion. this method just asserts that no exception is thrown + } + + public function getTransFileTests() + { + return array( + array('csv', 'CsvFileLoader'), + array('ini', 'IniFileLoader'), + array('mo', 'MoFileLoader'), + array('po', 'PoFileLoader'), + array('php', 'PhpFileLoader'), + array('ts', 'QtFileLoader'), + array('xlf', 'XliffFileLoader'), + array('yml', 'YamlFileLoader'), + array('json', 'JsonFileLoader'), + ); + } + + public function getTransTests() + { + return array( + array('Symfony est super !', 'Symfony is great!', 'Symfony est super !', array(), 'fr', ''), + array('Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', array('%what%' => 'awesome'), 'fr', ''), + array('Symfony est super !', new StringClass('Symfony is great!'), 'Symfony est super !', array(), 'fr', ''), + ); + } + + public function getFlattenedTransTests() + { + $messages = array( + 'symfony' => array( + 'is' => array( + 'great' => 'Symfony est super!', + ), + ), + 'foo' => array( + 'bar' => array( + 'baz' => 'Foo Bar Baz', + ), + 'baz' => 'Foo Baz', + ), + ); + + return array( + array('Symfony est super!', $messages, 'symfony.is.great'), + array('Foo Bar Baz', $messages, 'foo.bar.baz'), + array('Foo Baz', $messages, 'foo.baz'), + ); + } + + public function getTransChoiceTests() + { + return array( + array('Il y a 0 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), + array('Il y a 1 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''), + array('Il y a 10 pommes', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 10, array('%count%' => 10), 'fr', ''), + + array('Il y a 0 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), + array('Il y a 1 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''), + array('Il y a 10 pommes', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 10, array('%count%' => 10), 'fr', ''), + + array('Il y a 0 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), + array('Il y a 1 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''), + array('Il y a 10 pommes', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array('%count%' => 10), 'fr', ''), + + array('Il n\'y a aucune pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), + array('Il y a 1 pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''), + array('Il y a 10 pommes', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array('%count%' => 10), 'fr', ''), + + array('Il y a 0 pomme', new StringClass('{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples'), '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), + ); + } + + public function getInvalidLocalesTests() + { + return array( + array('fr FR'), + array('français'), + array('fr+en'), + array('utf#8'), + array('fr&en'), + array('fr~FR'), + array(' fr'), + array('fr '), + array('fr*'), + array('fr/FR'), + array('fr\\FR'), + ); + } + + public function getValidLocalesTests() + { + return array( + array(''), + array(null), + array('fr'), + array('francais'), + array('FR'), + array('frFR'), + array('fr-FR'), + array('fr_FR'), + array('fr.FR'), + array('fr-FR.UTF8'), + array('sr@latin'), + ); + } + + public function testTransChoiceFallback() + { + $translator = new Translator('ru'); + $translator->setFallbackLocales(array('en')); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en'); + + $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, array('%count%' => 10))); + } + + public function testTransChoiceFallbackBis() + { + $translator = new Translator('ru'); + $translator->setFallbackLocales(array('en_US', 'en')); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en_US'); + + $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, array('%count%' => 10))); + } + + public function testTransChoiceFallbackWithNoTranslation() + { + $translator = new Translator('ru'); + $translator->setFallbackLocales(array('en')); + $translator->addLoader('array', new ArrayLoader()); + + // consistent behavior with Translator::trans(), which returns the string + // unchanged if it can't be found + $this->assertEquals('some_message2', $translator->transChoice('some_message2', 10, array('%count%' => 10))); + } +} + +class StringClass +{ + protected $str; + + public function __construct($str) + { + $this->str = $str; + } + + public function __toString() + { + return $this->str; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Util/ArrayConverterTest.php b/public/system/storage/vendor/symfony/translation/Tests/Util/ArrayConverterTest.php new file mode 100644 index 0000000..9eea275 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Util/ArrayConverterTest.php @@ -0,0 +1,73 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Util; + +use Symfony\Component\Translation\Util\ArrayConverter; + +class ArrayConverterTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider messsagesData + */ + public function testDump($input, $expectedOutput) + { + $this->assertEquals($expectedOutput, ArrayConverter::expandToTree($input)); + } + + public function messsagesData() + { + return array( + array( + // input + array( + 'foo1' => 'bar', + 'foo.bar' => 'value', + ), + // expected output + array( + 'foo1' => 'bar', + 'foo' => array('bar' => 'value'), + ), + ), + array( + // input + array( + 'foo.bar' => 'value1', + 'foo.bar.test' => 'value2', + ), + // expected output + array( + 'foo' => array( + 'bar' => 'value1', + 'bar.test' => 'value2', + ), + ), + ), + array( + // input + array( + 'foo.level2.level3.level4' => 'value1', + 'foo.level2' => 'value2', + 'foo.bar' => 'value3', + ), + // expected output + array( + 'foo' => array( + 'level2' => 'value2', + 'level2.level3.level4' => 'value1', + 'bar' => 'value3', + ), + ), + ), + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php b/public/system/storage/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php new file mode 100644 index 0000000..f7a8a83 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Writer; + +use Symfony\Component\Translation\Dumper\DumperInterface; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Writer\TranslationWriter; + +class TranslationWriterTest extends \PHPUnit_Framework_TestCase +{ + public function testWriteTranslations() + { + $dumper = $this->getMock('Symfony\Component\Translation\Dumper\DumperInterface'); + $dumper + ->expects($this->once()) + ->method('dump'); + + $writer = new TranslationWriter(); + $writer->addDumper('test', $dumper); + $writer->writeTranslations(new MessageCatalogue(array()), 'test'); + } + + public function testDisableBackup() + { + $nonBackupDumper = new NonBackupDumper(); + $backupDumper = new BackupDumper(); + + $writer = new TranslationWriter(); + $writer->addDumper('non_backup', $nonBackupDumper); + $writer->addDumper('backup', $backupDumper); + $writer->disableBackup(); + + $this->assertFalse($backupDumper->backup, 'backup can be disabled if setBackup() method does exist'); + } +} + +class NonBackupDumper implements DumperInterface +{ + public function dump(MessageCatalogue $messages, $options = array()) + { + } +} + +class BackupDumper implements DumperInterface +{ + public $backup = true; + + public function dump(MessageCatalogue $messages, $options = array()) + { + } + + public function setBackup($backup) + { + $this->backup = $backup; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.mo b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.mo Binary files differnew file mode 100644 index 0000000..ed01000 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.mo diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.po new file mode 100644 index 0000000..ff6f22a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.po @@ -0,0 +1,3 @@ +msgid "foo" +msgstr "" + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.csv b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.csv new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.csv diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.ini b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.ini new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.ini diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.json b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.json new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.json diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.mo b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.mo new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.mo diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.po new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.po diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.xlf new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.xlf diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.yml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.yml diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/encoding.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/encoding.xlf new file mode 100644 index 0000000..0a88f92 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/encoding.xlf @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1" resname="foo"> + <source>foo</source> + <target>br</target> + <note>bz</note> + </trans-unit> + <trans-unit id="2" resname="bar"> + <source>bar</source> + <target>f</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id-plurals.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id-plurals.po new file mode 100644 index 0000000..c412aa2 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id-plurals.po @@ -0,0 +1,10 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" + +msgid "escaped \"foo\"" +msgid_plural "escaped \"foos\"" +msgstr[0] "escaped \"bar\"" +msgstr[1] "escaped \"bars\"" diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id.po new file mode 100644 index 0000000..308eadd --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id.po @@ -0,0 +1,8 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" + +msgid "escaped \"foo\"" +msgstr "escaped \"bar\"" diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/fuzzy-translations.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/fuzzy-translations.po new file mode 100644 index 0000000..04d4047 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/fuzzy-translations.po @@ -0,0 +1,10 @@ +#, php-format +msgid "foo1" +msgstr "bar1" + +#, fuzzy, php-format +msgid "foo2" +msgstr "fuzzy bar2" + +msgid "foo3" +msgstr "bar3" diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/invalid-xml-resources.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/invalid-xml-resources.xlf new file mode 100644 index 0000000..7bf6c98 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/invalid-xml-resources.xlf @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>foo</source> + <target>bar + </trans-unit> + <trans-unit id="2"> + <source>extra</source> + </trans-unit> + <trans-unit id="3"> + <source>key</source> + <target></target> + </trans-unit> + <trans-unit id="4"> + <source>test</source> + <target>with</target> + <note>note</note> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/malformed.json b/public/system/storage/vendor/symfony/translation/Tests/fixtures/malformed.json new file mode 100644 index 0000000..4563ec6 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/malformed.json @@ -0,0 +1,3 @@ +{ + "foo" "bar" +}
\ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages.yml new file mode 100644 index 0000000..d4f82d7 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages.yml @@ -0,0 +1,3 @@ +foo: + bar1: value1 + bar2: value2 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages_linear.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages_linear.yml new file mode 100644 index 0000000..6c1687d --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages_linear.yml @@ -0,0 +1,2 @@ +foo.bar1: value1 +foo.bar2: value2 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.xlf new file mode 100644 index 0000000..734fc97 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.xlf @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit> + <source>foo</source> + <target>bar</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.yml new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.yml @@ -0,0 +1 @@ +foo diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.mo b/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.mo Binary files differnew file mode 100644 index 0000000..6445e77 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.mo diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.po new file mode 100644 index 0000000..439c41a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.po @@ -0,0 +1,5 @@ +msgid "foo" +msgid_plural "foos" +msgstr[0] "bar" +msgstr[1] "bars" + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resname.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resname.xlf new file mode 100644 index 0000000..2df16af --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resname.xlf @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1" resname="foo"> + <source></source> + <target>bar</target> + </trans-unit> + <trans-unit id="2" resname="bar"> + <source>bar source</source> + <target>baz</target> + </trans-unit> + <trans-unit id="3"> + <source>baz</source> + <target>foo</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/corrupted/resources.dat b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/corrupted/resources.dat new file mode 100644 index 0000000..391250c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/corrupted/resources.dat @@ -0,0 +1 @@ +XXX
\ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.res b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.res Binary files differnew file mode 100644 index 0000000..1fc1436 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.res diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.txt b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.txt new file mode 100644 index 0000000..3d9e9ea --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.txt @@ -0,0 +1,3 @@ +en{ + symfony{"Symfony is great"} +}
\ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.res b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.res Binary files differnew file mode 100644 index 0000000..f584160 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.res diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.txt b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.txt new file mode 100644 index 0000000..182d0a0 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.txt @@ -0,0 +1,3 @@ +fr{ + symfony{"Symfony est génial"} +}
\ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/packagelist.txt b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/packagelist.txt new file mode 100644 index 0000000..c5783ed --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/packagelist.txt @@ -0,0 +1,2 @@ +en.res +fr.res diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/resources.dat b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/resources.dat Binary files differnew file mode 100644 index 0000000..563b0ea --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/resources.dat diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/res/en.res b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/res/en.res Binary files differnew file mode 100644 index 0000000..ad894a9 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/res/en.res diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf new file mode 100644 index 0000000..2efa155 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="fr-FR" trgLang="en-US"> + <file id="messages.en_US"> + <unit id="acbd18db4cc2f85cedef654fccc4a4d8"> + <segment> + <source>foo</source> + <target>bar</target> + </segment> + </unit> + <unit id="3c6e0b8a9c15224a8228b9a98ca1531d"> + <segment> + <source>key</source> + <target order="1"></target> + </segment> + </unit> + <unit id="18e6a493872558d949b4c16ea1fa6ab6"> + <segment> + <source>key.with.cdata</source> + <target><![CDATA[<source> & <target>]]></target> + </segment> + </unit> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0.xlf new file mode 100644 index 0000000..166172a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0.xlf @@ -0,0 +1,25 @@ +<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en-US" trgLang="ja-JP"> + <file id="f1" original="Graphic Example.psd"> + <skeleton href="Graphic Example.psd.skl"/> + <unit id="1"> + <segment> + <source>Quetzal</source> + <target>Quetzal</target> + </segment> + </unit> + <group id="1"> + <unit id="2"> + <segment> + <source>foo</source> + <target>XLIFF 文書を編集、または処理 するアプリケーションです。</target> + </segment> + </unit> + <unit id="3"> + <segment> + <source>bar</source> + <target order="1">XLIFF データ・マネージャ</target> + </segment> + </unit> + </group> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf new file mode 100644 index 0000000..436e19e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file source-language="fr-FR" target-language="en-US" datatype="plaintext" original="file.ext"> + <header> + <tool tool-id="symfony" tool-name="Symfony"/> + </header> + <body> + <trans-unit id="acbd18db4cc2f85cedef654fccc4a4d8" resname="foo"> + <source>foo</source> + <target>bar</target> + <note priority="1" from="bar">baz</note> + </trans-unit> + <trans-unit id="3c6e0b8a9c15224a8228b9a98ca1531d" resname="key"> + <source>key</source> + <target></target> + <note>baz</note> + <note>qux</note> + </trans-unit> + <trans-unit id="18e6a493872558d949b4c16ea1fa6ab6" resname="key.with.cdata"> + <source>key.with.cdata</source> + <target><![CDATA[<source> & <target>]]></target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf new file mode 100644 index 0000000..e3afb49 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file source-language="fr-FR" target-language="en-US" datatype="plaintext" original="file.ext"> + <header> + <tool tool-id="symfony" tool-name="Symfony"/> + </header> + <body> + <trans-unit id="acbd18db4cc2f85cedef654fccc4a4d8" resname="foo"> + <source>foo</source> + <target state="needs-translation">bar</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf new file mode 100644 index 0000000..1ed06d2 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file source-language="en-US" target-language="en-US" datatype="plaintext" original="file.ext"> + <header> + <tool tool-id="foo" tool-name="foo" tool-version="0.0" tool-company="Foo"/> + </header> + <body> + <trans-unit id="acbd18db4cc2f85cedef654fccc4a4d8" resname="foo"> + <source>foo</source> + <target>bar</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.csv b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.csv new file mode 100644 index 0000000..374b9eb --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.csv @@ -0,0 +1,4 @@ +"foo"; "bar" +#"bar"; "foo" +"incorrect"; "number"; "columns"; "will"; "be"; "ignored" +"incorrect"
\ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.dump.json b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.dump.json new file mode 100644 index 0000000..335965d --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.dump.json @@ -0,0 +1 @@ +{"foo":"\u0022bar\u0022"}
\ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ini b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ini new file mode 100644 index 0000000..4953062 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ini @@ -0,0 +1 @@ +foo="bar" diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.json b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.json new file mode 100644 index 0000000..8a79687 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.json @@ -0,0 +1,3 @@ +{ + "foo": "bar" +}
\ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.mo b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.mo Binary files differnew file mode 100644 index 0000000..0a96602 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.mo diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.php b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.php new file mode 100644 index 0000000..c291398 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.php @@ -0,0 +1,5 @@ +<?php + +return array ( + 'foo' => 'bar', +); diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.po new file mode 100644 index 0000000..ccfce6b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.po @@ -0,0 +1,8 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" + +msgid "foo" +msgstr "bar"
\ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ts b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ts new file mode 100644 index 0000000..40e1852 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ts @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<TS> + <context> + <name>resources</name> + <message> + <source>foo</source> + <translation>bar</translation> + </message> + </context> +</TS> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.xlf new file mode 100644 index 0000000..b0e5988 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.xlf @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>foo</source> + <target>bar</target> + </trans-unit> + <trans-unit id="2"> + <source>extra</source> + </trans-unit> + <trans-unit id="3"> + <source>key</source> + <target></target> + </trans-unit> + <trans-unit id="4"> + <source>test</source> + <target>with</target> + <note>note</note> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.yml new file mode 100644 index 0000000..20e9ff3 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.yml @@ -0,0 +1 @@ +foo: bar diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/valid.csv b/public/system/storage/vendor/symfony/translation/Tests/fixtures/valid.csv new file mode 100644 index 0000000..59882e5 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/valid.csv @@ -0,0 +1,4 @@ +foo;bar +bar;"foo +foo" +"foo;foo";bar diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/with-attributes.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/with-attributes.xlf new file mode 100644 index 0000000..7873062 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/with-attributes.xlf @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>foo</source> + <target state="translated">bar</target> + </trans-unit> + <trans-unit id="2"> + <source>extra</source> + <target state="needs-translation">bar</target> + </trans-unit> + <trans-unit id="3"> + <source>key</source> + <target></target> + <note>baz</note> + <note priority="2" from="bar">qux</note> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/withdoctype.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/withdoctype.xlf new file mode 100644 index 0000000..f83e834 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/withdoctype.xlf @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE foo> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>foo</source> + <target>bar</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/withnote.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/withnote.xlf new file mode 100644 index 0000000..b1d3f83 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/withnote.xlf @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>foo</source> + <target>bar</target> + <note priority="1">foo</note> + </trans-unit> + <trans-unit id="2"> + <source>extra</source> + <note from="foo">bar</note> + </trans-unit> + <trans-unit id="3"> + <source>key</source> + <target></target> + <note>baz</note> + <note priority="2" from="bar">qux</note> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/translation/Translator.php b/public/system/storage/vendor/symfony/translation/Translator.php new file mode 100644 index 0000000..309a2b8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Translator.php @@ -0,0 +1,441 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Translation\Loader\LoaderInterface; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\ConfigCacheInterface; +use Symfony\Component\Config\ConfigCacheFactoryInterface; +use Symfony\Component\Config\ConfigCacheFactory; + +/** + * Translator. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class Translator implements TranslatorInterface, TranslatorBagInterface +{ + /** + * @var MessageCatalogueInterface[] + */ + protected $catalogues = array(); + + /** + * @var string + */ + private $locale; + + /** + * @var array + */ + private $fallbackLocales = array(); + + /** + * @var LoaderInterface[] + */ + private $loaders = array(); + + /** + * @var array + */ + private $resources = array(); + + /** + * @var MessageSelector + */ + private $selector; + + /** + * @var string + */ + private $cacheDir; + + /** + * @var bool + */ + private $debug; + + /** + * @var ConfigCacheFactoryInterface|null + */ + private $configCacheFactory; + + /** + * Constructor. + * + * @param string $locale The locale + * @param MessageSelector|null $selector The message selector for pluralization + * @param string|null $cacheDir The directory to use for the cache + * @param bool $debug Use cache in debug mode ? + * + * @throws \InvalidArgumentException If a locale contains invalid characters + */ + public function __construct($locale, MessageSelector $selector = null, $cacheDir = null, $debug = false) + { + $this->setLocale($locale); + $this->selector = $selector ?: new MessageSelector(); + $this->cacheDir = $cacheDir; + $this->debug = $debug; + } + + /** + * Sets the ConfigCache factory to use. + * + * @param ConfigCacheFactoryInterface $configCacheFactory + */ + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) + { + $this->configCacheFactory = $configCacheFactory; + } + + /** + * Adds a Loader. + * + * @param string $format The name of the loader (@see addResource()) + * @param LoaderInterface $loader A LoaderInterface instance + */ + public function addLoader($format, LoaderInterface $loader) + { + $this->loaders[$format] = $loader; + } + + /** + * Adds a Resource. + * + * @param string $format The name of the loader (@see addLoader()) + * @param mixed $resource The resource name + * @param string $locale The locale + * @param string $domain The domain + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function addResource($format, $resource, $locale, $domain = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + $this->assertValidLocale($locale); + + $this->resources[$locale][] = array($format, $resource, $domain); + + if (in_array($locale, $this->fallbackLocales)) { + $this->catalogues = array(); + } else { + unset($this->catalogues[$locale]); + } + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->assertValidLocale($locale); + $this->locale = $locale; + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->locale; + } + + /** + * Sets the fallback locales. + * + * @param array $locales The fallback locales + * + * @throws \InvalidArgumentException If a locale contains invalid characters + */ + public function setFallbackLocales(array $locales) + { + // needed as the fallback locales are linked to the already loaded catalogues + $this->catalogues = array(); + + foreach ($locales as $locale) { + $this->assertValidLocale($locale); + } + + $this->fallbackLocales = $locales; + } + + /** + * Gets the fallback locales. + * + * @return array $locales The fallback locales + */ + public function getFallbackLocales() + { + return $this->fallbackLocales; + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + return strtr($this->getCatalogue($locale)->get((string) $id, $domain), $parameters); + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + $id = (string) $id; + $catalogue = $this->getCatalogue($locale); + $locale = $catalogue->getLocale(); + while (!$catalogue->defines($id, $domain)) { + if ($cat = $catalogue->getFallbackCatalogue()) { + $catalogue = $cat; + $locale = $catalogue->getLocale(); + } else { + break; + } + } + + return strtr($this->selector->choose($catalogue->get($id, $domain), (int) $number, $locale), $parameters); + } + + /** + * {@inheritdoc} + */ + public function getCatalogue($locale = null) + { + if (null === $locale) { + $locale = $this->getLocale(); + } else { + $this->assertValidLocale($locale); + } + + if (!isset($this->catalogues[$locale])) { + $this->loadCatalogue($locale); + } + + return $this->catalogues[$locale]; + } + + /** + * Gets the loaders. + * + * @return array LoaderInterface[] + */ + protected function getLoaders() + { + return $this->loaders; + } + + /** + * @param string $locale + */ + protected function loadCatalogue($locale) + { + if (null === $this->cacheDir) { + $this->initializeCatalogue($locale); + } else { + $this->initializeCacheCatalogue($locale); + } + } + + /** + * @param string $locale + */ + protected function initializeCatalogue($locale) + { + $this->assertValidLocale($locale); + + try { + $this->doLoadCatalogue($locale); + } catch (NotFoundResourceException $e) { + if (!$this->computeFallbackLocales($locale)) { + throw $e; + } + } + $this->loadFallbackCatalogues($locale); + } + + /** + * @param string $locale + */ + private function initializeCacheCatalogue($locale) + { + if (isset($this->catalogues[$locale])) { + /* Catalogue already initialized. */ + return; + } + + $this->assertValidLocale($locale); + $cache = $this->getConfigCacheFactory()->cache($this->getCatalogueCachePath($locale), + function (ConfigCacheInterface $cache) use ($locale) { + $this->dumpCatalogue($locale, $cache); + } + ); + + if (isset($this->catalogues[$locale])) { + /* Catalogue has been initialized as it was written out to cache. */ + return; + } + + /* Read catalogue from cache. */ + $this->catalogues[$locale] = include $cache->getPath(); + } + + private function dumpCatalogue($locale, ConfigCacheInterface $cache) + { + $this->initializeCatalogue($locale); + $fallbackContent = $this->getFallbackContent($this->catalogues[$locale]); + + $content = sprintf(<<<EOF +<?php + +use Symfony\Component\Translation\MessageCatalogue; + +\$catalogue = new MessageCatalogue('%s', %s); + +%s +return \$catalogue; + +EOF + , + $locale, + var_export($this->catalogues[$locale]->all(), true), + $fallbackContent + ); + + $cache->write($content, $this->catalogues[$locale]->getResources()); + } + + private function getFallbackContent(MessageCatalogue $catalogue) + { + $fallbackContent = ''; + $current = ''; + $replacementPattern = '/[^a-z0-9_]/i'; + $fallbackCatalogue = $catalogue->getFallbackCatalogue(); + while ($fallbackCatalogue) { + $fallback = $fallbackCatalogue->getLocale(); + $fallbackSuffix = ucfirst(preg_replace($replacementPattern, '_', $fallback)); + $currentSuffix = ucfirst(preg_replace($replacementPattern, '_', $current)); + + $fallbackContent .= sprintf(<<<EOF +\$catalogue%s = new MessageCatalogue('%s', %s); +\$catalogue%s->addFallbackCatalogue(\$catalogue%s); + +EOF + , + $fallbackSuffix, + $fallback, + var_export($fallbackCatalogue->all(), true), + $currentSuffix, + $fallbackSuffix + ); + $current = $fallbackCatalogue->getLocale(); + $fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue(); + } + + return $fallbackContent; + } + + private function getCatalogueCachePath($locale) + { + return $this->cacheDir.'/catalogue.'.$locale.'.'.sha1(serialize($this->fallbackLocales)).'.php'; + } + + private function doLoadCatalogue($locale) + { + $this->catalogues[$locale] = new MessageCatalogue($locale); + + if (isset($this->resources[$locale])) { + foreach ($this->resources[$locale] as $resource) { + if (!isset($this->loaders[$resource[0]])) { + throw new \RuntimeException(sprintf('The "%s" translation loader is not registered.', $resource[0])); + } + $this->catalogues[$locale]->addCatalogue($this->loaders[$resource[0]]->load($resource[1], $locale, $resource[2])); + } + } + } + + private function loadFallbackCatalogues($locale) + { + $current = $this->catalogues[$locale]; + + foreach ($this->computeFallbackLocales($locale) as $fallback) { + if (!isset($this->catalogues[$fallback])) { + $this->doLoadCatalogue($fallback); + } + + $fallbackCatalogue = new MessageCatalogue($fallback, $this->catalogues[$fallback]->all()); + foreach ($this->catalogues[$fallback]->getResources() as $resource) { + $fallbackCatalogue->addResource($resource); + } + $current->addFallbackCatalogue($fallbackCatalogue); + $current = $fallbackCatalogue; + } + } + + protected function computeFallbackLocales($locale) + { + $locales = array(); + foreach ($this->fallbackLocales as $fallback) { + if ($fallback === $locale) { + continue; + } + + $locales[] = $fallback; + } + + if (strrchr($locale, '_') !== false) { + array_unshift($locales, substr($locale, 0, -strlen(strrchr($locale, '_')))); + } + + return array_unique($locales); + } + + /** + * Asserts that the locale is valid, throws an Exception if not. + * + * @param string $locale Locale to tests + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + protected function assertValidLocale($locale) + { + if (1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) { + throw new \InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale)); + } + } + + /** + * Provides the ConfigCache factory implementation, falling back to a + * default implementation if necessary. + * + * @return ConfigCacheFactoryInterface $configCacheFactory + */ + private function getConfigCacheFactory() + { + if (!$this->configCacheFactory) { + $this->configCacheFactory = new ConfigCacheFactory($this->debug); + } + + return $this->configCacheFactory; + } +} diff --git a/public/system/storage/vendor/symfony/translation/TranslatorBagInterface.php b/public/system/storage/vendor/symfony/translation/TranslatorBagInterface.php new file mode 100644 index 0000000..14fbb17 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/TranslatorBagInterface.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * TranslatorBagInterface. + * + * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> + */ +interface TranslatorBagInterface +{ + /** + * Gets the catalogue by locale. + * + * @param string|null $locale The locale or null to use the default + * + * @return MessageCatalogueInterface + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function getCatalogue($locale = null); +} diff --git a/public/system/storage/vendor/symfony/translation/TranslatorInterface.php b/public/system/storage/vendor/symfony/translation/TranslatorInterface.php new file mode 100644 index 0000000..6916c33 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/TranslatorInterface.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * TranslatorInterface. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +interface TranslatorInterface +{ + /** + * Translates the given message. + * + * @param string $id The message id (may also be an object that can be cast to string) + * @param array $parameters An array of parameters for the message + * @param string|null $domain The domain for the message or null to use the default + * @param string|null $locale The locale or null to use the default + * + * @return string The translated string + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null); + + /** + * Translates the given choice message by choosing a translation according to a number. + * + * @param string $id The message id (may also be an object that can be cast to string) + * @param int $number The number to use to find the indice of the message + * @param array $parameters An array of parameters for the message + * @param string|null $domain The domain for the message or null to use the default + * @param string|null $locale The locale or null to use the default + * + * @return string The translated string + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null); + + /** + * Sets the current locale. + * + * @param string $locale The locale + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function setLocale($locale); + + /** + * Returns the current locale. + * + * @return string The locale + */ + public function getLocale(); +} diff --git a/public/system/storage/vendor/symfony/translation/Util/ArrayConverter.php b/public/system/storage/vendor/symfony/translation/Util/ArrayConverter.php new file mode 100644 index 0000000..60a55e9 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Util/ArrayConverter.php @@ -0,0 +1,99 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Util; + +/** + * ArrayConverter generates tree like structure from a message catalogue. + * e.g. this + * 'foo.bar1' => 'test1', + * 'foo.bar2' => 'test2' + * converts to follows: + * foo: + * bar1: test1 + * bar2: test2. + * + * @author Gennady Telegin <gtelegin@gmail.com> + */ +class ArrayConverter +{ + /** + * Converts linear messages array to tree-like array. + * For example this rray('foo.bar' => 'value') will be converted to array('foo' => array('bar' => 'value')). + * + * @param array $messages Linear messages array + * + * @return array Tree-like messages array + */ + public static function expandToTree(array $messages) + { + $tree = array(); + + foreach ($messages as $id => $value) { + $referenceToElement = &self::getElementByPath($tree, explode('.', $id)); + + $referenceToElement = $value; + + unset($referenceToElement); + } + + return $tree; + } + + private static function &getElementByPath(array &$tree, array $parts) + { + $elem = &$tree; + $parentOfElem = null; + + foreach ($parts as $i => $part) { + if (isset($elem[$part]) && is_string($elem[$part])) { + /* Process next case: + * 'foo': 'test1', + * 'foo.bar': 'test2' + * + * $tree['foo'] was string before we found array {bar: test2}. + * Treat new element as string too, e.g. add $tree['foo.bar'] = 'test2'; + */ + $elem = &$elem[ implode('.', array_slice($parts, $i)) ]; + break; + } + $parentOfElem = &$elem; + $elem = &$elem[$part]; + } + + if (is_array($elem) && count($elem) > 0 && $parentOfElem) { + /* Process next case: + * 'foo.bar': 'test1' + * 'foo': 'test2' + * + * $tree['foo'] was array = {bar: 'test1'} before we found string constant `foo`. + * Cancel treating $tree['foo'] as array and cancel back it expansion, + * e.g. make it $tree['foo.bar'] = 'test1' again. + */ + self::cancelExpand($parentOfElem, $part, $elem); + } + + return $elem; + } + + private static function cancelExpand(array &$tree, $prefix, array $node) + { + $prefix .= '.'; + + foreach ($node as $id => $value) { + if (is_string($value)) { + $tree[$prefix.$id] = $value; + } else { + self::cancelExpand($tree, $prefix.$id, $value); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Writer/TranslationWriter.php b/public/system/storage/vendor/symfony/translation/Writer/TranslationWriter.php new file mode 100644 index 0000000..2f5eaa1 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Writer/TranslationWriter.php @@ -0,0 +1,89 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Writer; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\DumperInterface; + +/** + * TranslationWriter writes translation messages. + * + * @author Michel Salib <michelsalib@hotmail.com> + */ +class TranslationWriter +{ + /** + * Dumpers used for export. + * + * @var array + */ + private $dumpers = array(); + + /** + * Adds a dumper to the writer. + * + * @param string $format The format of the dumper + * @param DumperInterface $dumper The dumper + */ + public function addDumper($format, DumperInterface $dumper) + { + $this->dumpers[$format] = $dumper; + } + + /** + * Disables dumper backup. + */ + public function disableBackup() + { + foreach ($this->dumpers as $dumper) { + if (method_exists($dumper, 'setBackup')) { + $dumper->setBackup(false); + } + } + } + + /** + * Obtains the list of supported formats. + * + * @return array + */ + public function getFormats() + { + return array_keys($this->dumpers); + } + + /** + * Writes translation from the catalogue according to the selected format. + * + * @param MessageCatalogue $catalogue The message catalogue to dump + * @param string $format The format to use to dump the messages + * @param array $options Options that are passed to the dumper + * + * @throws \InvalidArgumentException + */ + public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array()) + { + if (!isset($this->dumpers[$format])) { + throw new \InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format)); + } + + // get the right dumper + $dumper = $this->dumpers[$format]; + + if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) { + throw new \RuntimeException(sprintf('Translation Writer was not able to create directory "%s"', $options['path'])); + } + + // save + $dumper->dump($catalogue, $options); + } +} diff --git a/public/system/storage/vendor/symfony/translation/composer.json b/public/system/storage/vendor/symfony/translation/composer.json new file mode 100644 index 0000000..916cd1a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/composer.json @@ -0,0 +1,48 @@ +{ + "name": "symfony/translation", + "type": "library", + "description": "Symfony Translation Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/config": "~2.8|~3.0", + "symfony/intl": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "suggest": { + "symfony/config": "", + "symfony/yaml": "", + "psr/log": "To use logging capability in translator" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Translation\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/phpunit.xml.dist b/public/system/storage/vendor/symfony/translation/phpunit.xml.dist new file mode 100644 index 0000000..c25ec5e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/phpunit.xml.dist @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" + backupGlobals="false" + colors="true" + bootstrap="vendor/autoload.php" +> + <php> + <ini name="error_reporting" value="-1" /> + </php> + + <testsuites> + <testsuite name="Symfony Translation Component Test Suite"> + <directory>./Tests/</directory> + </testsuite> + </testsuites> + + <filter> + <whitelist> + <directory>./</directory> + <exclude> + <directory>./Tests</directory> + <directory>./vendor</directory> + </exclude> + </whitelist> + </filter> +</phpunit> diff --git a/public/system/storage/vendor/symfony/validator/.gitignore b/public/system/storage/vendor/symfony/validator/.gitignore new file mode 100644 index 0000000..c49a5d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/.gitignore @@ -0,0 +1,3 @@ +vendor/ +composer.lock +phpunit.xml diff --git a/public/system/storage/vendor/symfony/validator/CHANGELOG.md b/public/system/storage/vendor/symfony/validator/CHANGELOG.md new file mode 100644 index 0000000..0ff667b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/CHANGELOG.md @@ -0,0 +1,175 @@ +CHANGELOG +========= + +2.8.0 +----- + + * added the BIC (SWIFT-Code) validator + +2.7.0 +----- + + * deprecated `DefaultTranslator` in favor of `Symfony\Component\Translation\IdentityTranslator` + * deprecated PHP7-incompatible constraints (Null, True, False) and related validators (NullValidator, TrueValidator, FalseValidator) in favor of their `Is`-prefixed equivalent + +2.6.0 +----- + + * [BC BREAK] `FileValidator` disallow empty files + * [BC BREAK] `UserPasswordValidator` source message change + * [BC BREAK] added internal `ExecutionContextInterface::setConstraint()` + * added `ConstraintViolation::getConstraint()` + * [BC BREAK] The `ExpressionValidator` will now evaluate the Expression even when the property value is null or an empty string + * deprecated `ClassMetadata::hasMemberMetadatas()` + * deprecated `ClassMetadata::getMemberMetadatas()` + * deprecated `ClassMetadata::addMemberMetadata()` + * [BC BREAK] added `Mapping\MetadataInterface::getConstraints()` + * added generic "payload" option to all constraints for attaching domain-specific data + * [BC BREAK] added `ConstraintViolationBuilderInterface::setCause()` + +2.5.0 +----- + + * deprecated `ApcCache` in favor of `DoctrineCache` + * added `DoctrineCache` to adapt any Doctrine cache + * `GroupSequence` now implements `ArrayAccess`, `Countable` and `Traversable` + * [BC BREAK] changed `ClassMetadata::getGroupSequence()` to return a `GroupSequence` instance instead of an array + * `Callback` can now be put onto properties (useful when you pass a closure to the constraint) + * deprecated `ClassBasedInterface` + * deprecated `MetadataInterface` + * deprecated `PropertyMetadataInterface` + * deprecated `PropertyMetadataContainerInterface` + * deprecated `Mapping\ElementMetadata` + * added `Mapping\MetadataInterface` + * added `Mapping\ClassMetadataInterface` + * added `Mapping\PropertyMetadataInterface` + * added `Mapping\GenericMetadata` + * added `Mapping\CascadingStrategy` + * added `Mapping\TraversalStrategy` + * deprecated `Mapping\ClassMetadata::accept()` + * deprecated `Mapping\MemberMetadata::accept()` + * removed array type hint of `Mapping\ClassMetadata::setGroupSequence()` + * deprecated `MetadataFactoryInterface` + * deprecated `Mapping\BlackholeMetadataFactory` + * deprecated `Mapping\ClassMetadataFactory` + * added `Mapping\Factory\MetadataFactoryInterface` + * added `Mapping\Factory\BlackHoleMetadataFactory` + * added `Mapping\Factory\LazyLoadingMetadataFactory` + * deprecated `ExecutionContextInterface` + * deprecated `ExecutionContext` + * deprecated `GlobalExecutionContextInterface` + * added `Context\ExecutionContextInterface` + * added `Context\ExecutionContext` + * added `Context\ExecutionContextFactoryInterface` + * added `Context\ExecutionContextFactory` + * deprecated `ValidatorInterface` + * deprecated `Validator` + * deprecated `ValidationVisitorInterface` + * deprecated `ValidationVisitor` + * added `Validator\ValidatorInterface` + * added `Validator\RecursiveValidator` + * added `Validator\ContextualValidatorInterface` + * added `Validator\RecursiveContextualValidator` + * added `Violation\ConstraintViolationBuilderInterface` + * added `Violation\ConstraintViolationBuilder` + * added `ConstraintViolation::getParameters()` + * added `ConstraintViolation::getPlural()` + * added `Constraints\Traverse` + * deprecated `$deep` property in `Constraints\Valid` + * added `ValidatorBuilderInterface::setApiVersion()` + * added `Validation::API_VERSION_2_4` + * added `Validation::API_VERSION_2_5` + * added `Exception\OutOfBoundsException` + * added `Exception\UnsupportedMetadataException` + * made `Exception\ValidatorException` extend `Exception\RuntimeException` + * added `Util\PropertyPath` + * made the PropertyAccess component an optional dependency + * deprecated `ValidatorBuilder::setPropertyAccessor()` + * deprecated `validate` and `validateValue` on `Validator\Context\ExecutionContext` use `getValidator()` together with `inContext()` instead + +2.4.0 +----- + + * added a constraint the uses the expression language + * added `minRatio`, `maxRatio`, `allowSquare`, `allowLandscape`, and `allowPortrait` to Image validator + +2.3.29 +------ + + * fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator) + +2.3.0 +----- + + * added the ISBN, ISSN, and IBAN validators + * copied the constraints `Optional` and `Required` to the + `Symfony\Component\Validator\Constraints\` namespace and deprecated the original + classes. + * added comparison validators (EqualTo, NotEqualTo, LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, IdenticalTo, NotIdenticalTo) + +2.2.0 +----- + + * added a CardScheme validator + * added a Luhn validator + * moved @api-tags from `Validator` to `ValidatorInterface` + * moved @api-tags from `ConstraintViolation` to the new `ConstraintViolationInterface` + * moved @api-tags from `ConstraintViolationList` to the new `ConstraintViolationListInterface` + * moved @api-tags from `ExecutionContext` to the new `ExecutionContextInterface` + * [BC BREAK] `ConstraintValidatorInterface::initialize` is now type hinted against `ExecutionContextInterface` instead of `ExecutionContext` + * [BC BREAK] changed the visibility of the properties in `Validator` from protected to private + * deprecated `ClassMetadataFactoryInterface` in favor of the new `MetadataFactoryInterface` + * deprecated `ClassMetadataFactory::getClassMetadata` in favor of `getMetadataFor` + * created `MetadataInterface`, `PropertyMetadataInterface`, `ClassBasedInterface` and `PropertyMetadataContainerInterface` + * deprecated `GraphWalker` in favor of the new `ValidationVisitorInterface` + * deprecated `ExecutionContext::addViolationAtPath` + * deprecated `ExecutionContext::addViolationAtSubPath` in favor of `ExecutionContextInterface::addViolationAt` + * deprecated `ExecutionContext::getCurrentClass` in favor of `ExecutionContextInterface::getClassName` + * deprecated `ExecutionContext::getCurrentProperty` in favor of `ExecutionContextInterface::getPropertyName` + * deprecated `ExecutionContext::getCurrentValue` in favor of `ExecutionContextInterface::getValue` + * deprecated `ExecutionContext::getGraphWalker` in favor of `ExecutionContextInterface::validate` and `ExecutionContextInterface::validateValue` + * improved `ValidatorInterface::validateValue` to accept arrays of constraints + * changed `ValidatorInterface::getMetadataFactory` to return a `MetadataFactoryInterface` instead of a `ClassMetadataFactoryInterface` + * removed `ClassMetadataFactoryInterface` type hint from `ValidatorBuilderInterface::setMetadataFactory`. + As of Symfony 2.3, this method will be typed against `MetadataFactoryInterface` instead. + * [BC BREAK] the switches `traverse` and `deep` in the `Valid` constraint and in `GraphWalker::walkReference` + are ignored for arrays now. Arrays are always traversed recursively. + * added dependency to Translation component + * violation messages are now translated with a TranslatorInterface implementation + * [BC BREAK] inserted argument `$message` in the constructor of `ConstraintViolation` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ExecutionContext` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `GraphWalker` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ValidationVisitor` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `Validator` + * [BC BREAK] added `setTranslator()` and `setTranslationDomain()` to `ValidatorBuilderInterface` + * improved the Validator to support pluralized messages by default + * [BC BREAK] changed the source of all pluralized messages in the translation files to the pluralized version + * added ExceptionInterface, BadMethodCallException and InvalidArgumentException + +2.1.0 +----- + + * added support for `ctype_*` assertions in `TypeValidator` + * improved the ImageValidator with min width, max width, min height, and max height constraints + * added support for MIME with wildcard in FileValidator + * changed Collection validator to add "missing" and "extra" errors to + individual fields + * changed default value for `extraFieldsMessage` and `missingFieldsMessage` + in Collection constraint + * made ExecutionContext immutable + * deprecated Constraint methods `setMessage`, `getMessageTemplate` and + `getMessageParameters` + * added support for dynamic group sequences with the GroupSequenceProvider pattern + * [BC BREAK] ConstraintValidatorInterface method `isValid` has been renamed to + `validate`, its return value was dropped. ConstraintValidator still contains + `isValid` for BC + * [BC BREAK] collections in fields annotated with `Valid` are not traversed + recursively anymore by default. `Valid` contains a new property `deep` + which enables the BC behavior. + * added Count constraint + * added Length constraint + * added Range constraint + * deprecated the Min and Max constraints + * deprecated the MinLength and MaxLength constraints + * added Validation and ValidatorBuilderInterface + * deprecated ValidatorContext, ValidatorContextInterface and ValidatorFactory diff --git a/public/system/storage/vendor/symfony/validator/ClassBasedInterface.php b/public/system/storage/vendor/symfony/validator/ClassBasedInterface.php new file mode 100644 index 0000000..c57da27 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ClassBasedInterface.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * An object backed by a PHP class. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Mapping\ClassMetadataInterface} instead. + */ +interface ClassBasedInterface +{ + /** + * Returns the name of the backing PHP class. + * + * @return string The name of the backing class + */ + public function getClassName(); +} diff --git a/public/system/storage/vendor/symfony/validator/Constraint.php b/public/system/storage/vendor/symfony/validator/Constraint.php new file mode 100644 index 0000000..45d4bcf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraint.php @@ -0,0 +1,298 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\InvalidArgumentException; +use Symfony\Component\Validator\Exception\InvalidOptionsException; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * Contains the properties of a constraint definition. + * + * A constraint can be defined on a class, a property or a getter method. + * The Constraint class encapsulates all the configuration required for + * validating this class, property or getter result successfully. + * + * Constraint instances are immutable and serializable. + * + * @property array $groups The groups that the constraint belongs to + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class Constraint +{ + /** + * The name of the group given to all constraints with no explicit group. + */ + const DEFAULT_GROUP = 'Default'; + + /** + * Marks a constraint that can be put onto classes. + */ + const CLASS_CONSTRAINT = 'class'; + + /** + * Marks a constraint that can be put onto properties. + */ + const PROPERTY_CONSTRAINT = 'property'; + + /** + * Maps error codes to the names of their constants. + */ + protected static $errorNames = array(); + + /** + * Domain-specific data attached to a constraint. + * + * @var mixed + */ + public $payload; + + /** + * Returns the name of the given error code. + * + * @param string $errorCode The error code + * + * @return string The name of the error code + * + * @throws InvalidArgumentException If the error code does not exist + */ + public static function getErrorName($errorCode) + { + if (!isset(static::$errorNames[$errorCode])) { + throw new InvalidArgumentException(sprintf('The error code "%s" does not exist for constraint of type "%s".', $errorCode, \get_called_class())); + } + + return static::$errorNames[$errorCode]; + } + + /** + * Initializes the constraint with options. + * + * You should pass an associative array. The keys should be the names of + * existing properties in this class. The values should be the value for these + * properties. + * + * Alternatively you can override the method getDefaultOption() to return the + * name of an existing property. If no associative array is passed, this + * property is set instead. + * + * You can force that certain options are set by overriding + * getRequiredOptions() to return the names of these options. If any + * option is not set here, an exception is thrown. + * + * @param mixed $options The options (as associative array) + * or the value for the default + * option (any other type) + * + * @throws InvalidOptionsException When you pass the names of non-existing + * options + * @throws MissingOptionsException When you don't pass any of the options + * returned by getRequiredOptions() + * @throws ConstraintDefinitionException When you don't pass an associative + * array, but getDefaultOption() returns + * null + */ + public function __construct($options = null) + { + $invalidOptions = array(); + $missingOptions = array_flip((array) $this->getRequiredOptions()); + $knownOptions = get_object_vars($this); + + // The "groups" option is added to the object lazily + $knownOptions['groups'] = true; + + if (\is_array($options) && \count($options) >= 1 && isset($options['value']) && !property_exists($this, 'value')) { + $options[$this->getDefaultOption()] = $options['value']; + unset($options['value']); + } + + if (\is_array($options)) { + reset($options); + } + if (\is_array($options) && \count($options) > 0 && \is_string(key($options))) { + foreach ($options as $option => $value) { + if (array_key_exists($option, $knownOptions)) { + $this->$option = $value; + unset($missingOptions[$option]); + } else { + $invalidOptions[] = $option; + } + } + } elseif (null !== $options && !(\is_array($options) && 0 === \count($options))) { + $option = $this->getDefaultOption(); + + if (null === $option) { + throw new ConstraintDefinitionException(sprintf('No default option is configured for constraint %s', \get_class($this))); + } + + if (array_key_exists($option, $knownOptions)) { + $this->$option = $options; + unset($missingOptions[$option]); + } else { + $invalidOptions[] = $option; + } + } + + if (\count($invalidOptions) > 0) { + throw new InvalidOptionsException(sprintf('The options "%s" do not exist in constraint %s', implode('", "', $invalidOptions), \get_class($this)), $invalidOptions); + } + + if (\count($missingOptions) > 0) { + throw new MissingOptionsException(sprintf('The options "%s" must be set for constraint %s', implode('", "', array_keys($missingOptions)), \get_class($this)), array_keys($missingOptions)); + } + } + + /** + * Sets the value of a lazily initialized option. + * + * Corresponding properties are added to the object on first access. Hence + * this method will be called at most once per constraint instance and + * option name. + * + * @param string $option The option name + * @param mixed $value The value to set + * + * @throws InvalidOptionsException If an invalid option name is given + */ + public function __set($option, $value) + { + if ('groups' === $option) { + $this->groups = (array) $value; + + return; + } + + throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), array($option)); + } + + /** + * Returns the value of a lazily initialized option. + * + * Corresponding properties are added to the object on first access. Hence + * this method will be called at most once per constraint instance and + * option name. + * + * @param string $option The option name + * + * @return mixed The value of the option + * + * @throws InvalidOptionsException If an invalid option name is given + * + * @internal this method should not be used or overwritten in userland code + */ + public function __get($option) + { + if ('groups' === $option) { + $this->groups = array(self::DEFAULT_GROUP); + + return $this->groups; + } + + throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), array($option)); + } + + /** + * @param string $option The option name + * + * @return bool + */ + public function __isset($option) + { + return 'groups' === $option; + } + + /** + * Adds the given group if this constraint is in the Default group. + * + * @param string $group + */ + public function addImplicitGroupName($group) + { + if (\in_array(self::DEFAULT_GROUP, $this->groups) && !\in_array($group, $this->groups)) { + $this->groups[] = $group; + } + } + + /** + * Returns the name of the default option. + * + * Override this method to define a default option. + * + * @return string + * + * @see __construct() + */ + public function getDefaultOption() + { + } + + /** + * Returns the name of the required options. + * + * Override this method if you want to define required options. + * + * @return array + * + * @see __construct() + */ + public function getRequiredOptions() + { + return array(); + } + + /** + * Returns the name of the class that validates this constraint. + * + * By default, this is the fully qualified name of the constraint class + * suffixed with "Validator". You can override this method to change that + * behaviour. + * + * @return string + */ + public function validatedBy() + { + return \get_class($this).'Validator'; + } + + /** + * Returns whether the constraint can be put onto classes, properties or + * both. + * + * This method should return one or more of the constants + * Constraint::CLASS_CONSTRAINT and Constraint::PROPERTY_CONSTRAINT. + * + * @return string|array One or more constant values + */ + public function getTargets() + { + return self::PROPERTY_CONSTRAINT; + } + + /** + * Optimizes the serialized value to minimize storage space. + * + * @return array The properties to serialize + * + * @internal This method may be replaced by an implementation of + * {@link \Serializable} in the future. Please don't use or + * overwrite it. + */ + public function __sleep() + { + // Initialize "groups" option if it is not set + $this->groups; + + return array_keys(get_object_vars($this)); + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintValidator.php b/public/system/storage/vendor/symfony/validator/ConstraintValidator.php new file mode 100644 index 0000000..6f8c05a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintValidator.php @@ -0,0 +1,214 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Context\ExecutionContextInterface as ExecutionContextInterface2Dot5; +use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; +use Symfony\Component\Validator\Violation\LegacyConstraintViolationBuilder; + +/** + * Base class for constraint validators. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class ConstraintValidator implements ConstraintValidatorInterface +{ + /** + * Whether to format {@link \DateTime} objects as RFC-3339 dates + * ("Y-m-d H:i:s"). + */ + const PRETTY_DATE = 1; + + /** + * Whether to cast objects with a "__toString()" method to strings. + */ + const OBJECT_TO_STRING = 2; + + /** + * @var ExecutionContextInterface2Dot5 + */ + protected $context; + + /** + * {@inheritdoc} + */ + public function initialize(ExecutionContextInterface $context) + { + $this->context = $context; + } + + /** + * Wrapper for {@link ExecutionContextInterface::buildViolation} that + * supports the 2.4 context API. + * + * @param string $message The violation message + * @param array $parameters The message parameters + * + * @return ConstraintViolationBuilderInterface The violation builder + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + protected function buildViolation($message, array $parameters = array()) + { + @trigger_error('The '.__METHOD__.' is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + if ($this->context instanceof ExecutionContextInterface2Dot5) { + return $this->context->buildViolation($message, $parameters); + } + + return new LegacyConstraintViolationBuilder($this->context, $message, $parameters); + } + + /** + * Wrapper for {@link ExecutionContextInterface::buildViolation} that + * supports the 2.4 context API. + * + * @param ExecutionContextInterface $context The context to use + * @param string $message The violation message + * @param array $parameters The message parameters + * + * @return ConstraintViolationBuilderInterface The violation builder + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + protected function buildViolationInContext(ExecutionContextInterface $context, $message, array $parameters = array()) + { + @trigger_error('The '.__METHOD__.' is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + if ($context instanceof ExecutionContextInterface2Dot5) { + return $context->buildViolation($message, $parameters); + } + + return new LegacyConstraintViolationBuilder($context, $message, $parameters); + } + + /** + * Returns a string representation of the type of the value. + * + * This method should be used if you pass the type of a value as + * message parameter to a constraint violation. Note that such + * parameters should usually not be included in messages aimed at + * non-technical people. + * + * @param mixed $value The value to return the type of + * + * @return string The type of the value + */ + protected function formatTypeOf($value) + { + return \is_object($value) ? \get_class($value) : \gettype($value); + } + + /** + * Returns a string representation of the value. + * + * This method returns the equivalent PHP tokens for most scalar types + * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped + * in double quotes ("). Objects, arrays and resources are formatted as + * "object", "array" and "resource". If the $format bitmask contains + * the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted + * as RFC-3339 dates ("Y-m-d H:i:s"). + * + * Be careful when passing message parameters to a constraint violation + * that (may) contain objects, arrays or resources. These parameters + * should only be displayed for technical users. Non-technical users + * won't know what an "object", "array" or "resource" is and will be + * confused by the violation message. + * + * @param mixed $value The value to format as string + * @param int $format A bitwise combination of the format + * constants in this class + * + * @return string The string representation of the passed value + */ + protected function formatValue($value, $format = 0) + { + $isDateTime = $value instanceof \DateTime || $value instanceof \DateTimeInterface; + + if (($format & self::PRETTY_DATE) && $isDateTime) { + if (class_exists('IntlDateFormatter')) { + $locale = \Locale::getDefault(); + $formatter = new \IntlDateFormatter($locale, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT); + + // neither the native nor the stub IntlDateFormatter support + // DateTimeImmutable as of yet + if (!$value instanceof \DateTime) { + $value = new \DateTime( + $value->format('Y-m-d H:i:s.u e'), + $value->getTimezone() + ); + } + + return $formatter->format($value); + } + + return $value->format('Y-m-d H:i:s'); + } + + if (\is_object($value)) { + if (($format & self::OBJECT_TO_STRING) && method_exists($value, '__toString')) { + return $value->__toString(); + } + + return 'object'; + } + + if (\is_array($value)) { + return 'array'; + } + + if (\is_string($value)) { + return '"'.$value.'"'; + } + + if (\is_resource($value)) { + return 'resource'; + } + + if (null === $value) { + return 'null'; + } + + if (false === $value) { + return 'false'; + } + + if (true === $value) { + return 'true'; + } + + return (string) $value; + } + + /** + * Returns a string representation of a list of values. + * + * Each of the values is converted to a string using + * {@link formatValue()}. The values are then concatenated with commas. + * + * @param array $values A list of values + * @param int $format A bitwise combination of the format + * constants in this class + * + * @return string The string representation of the value list + * + * @see formatValue() + */ + protected function formatValues(array $values, $format = 0) + { + foreach ($values as $key => $value) { + $values[$key] = $this->formatValue($value, $format); + } + + return implode(', ', $values); + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactory.php b/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactory.php new file mode 100644 index 0000000..cc6981b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactory.php @@ -0,0 +1,51 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Constraints\ExpressionValidator; + +/** + * Default implementation of the ConstraintValidatorFactoryInterface. + * + * This enforces the convention that the validatedBy() method on any + * Constraint will return the class name of the ConstraintValidator that + * should validate the Constraint. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class ConstraintValidatorFactory implements ConstraintValidatorFactoryInterface +{ + protected $validators = array(); + + private $propertyAccessor; + + public function __construct($propertyAccessor = null) + { + $this->propertyAccessor = $propertyAccessor; + } + + /** + * {@inheritdoc} + */ + public function getInstance(Constraint $constraint) + { + $className = $constraint->validatedBy(); + + if (!isset($this->validators[$className])) { + $this->validators[$className] = 'validator.expression' === $className + ? new ExpressionValidator($this->propertyAccessor) + : new $className(); + } + + return $this->validators[$className]; + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php b/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php new file mode 100644 index 0000000..b647645 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php @@ -0,0 +1,27 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Specifies an object able to return the correct ConstraintValidatorInterface + * instance given a Constraint object. + */ +interface ConstraintValidatorFactoryInterface +{ + /** + * Given a Constraint, this returns the ConstraintValidatorInterface + * object that should be used to verify its validity. + * + * @return ConstraintValidatorInterface + */ + public function getInstance(Constraint $constraint); +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintValidatorInterface.php b/public/system/storage/vendor/symfony/validator/ConstraintValidatorInterface.php new file mode 100644 index 0000000..85fd451 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintValidatorInterface.php @@ -0,0 +1,33 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ConstraintValidatorInterface +{ + /** + * Initializes the constraint validator. + * + * @param ExecutionContextInterface $context The current validation context + */ + public function initialize(ExecutionContextInterface $context); + + /** + * Checks if the passed value is valid. + * + * @param mixed $value The value that should be validated + * @param Constraint $constraint The constraint for the validation + */ + public function validate($value, Constraint $constraint); +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintViolation.php b/public/system/storage/vendor/symfony/validator/ConstraintViolation.php new file mode 100644 index 0000000..804aa2c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintViolation.php @@ -0,0 +1,204 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Default implementation of {@ConstraintViolationInterface}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class ConstraintViolation implements ConstraintViolationInterface +{ + private $message; + private $messageTemplate; + private $parameters; + private $plural; + private $root; + private $propertyPath; + private $invalidValue; + private $constraint; + private $code; + private $cause; + + /** + * Creates a new constraint violation. + * + * @param string $message The violation message + * @param string $messageTemplate The raw violation message + * @param array $parameters The parameters to substitute in the + * raw violation message + * @param mixed $root The value originally passed to the + * validator + * @param string $propertyPath The property path from the root + * value to the invalid value + * @param mixed $invalidValue The invalid value that caused this + * violation + * @param int|null $plural The number for determining the plural + * form when translating the message + * @param mixed $code The error code of the violation + * @param Constraint|null $constraint The constraint whose validation + * caused the violation + * @param mixed $cause The cause of the violation + */ + public function __construct($message, $messageTemplate, array $parameters, $root, $propertyPath, $invalidValue, $plural = null, $code = null, Constraint $constraint = null, $cause = null) + { + $this->message = $message; + $this->messageTemplate = $messageTemplate; + $this->parameters = $parameters; + $this->plural = $plural; + $this->root = $root; + $this->propertyPath = $propertyPath; + $this->invalidValue = $invalidValue; + $this->constraint = $constraint; + $this->code = $code; + $this->cause = $cause; + } + + /** + * Converts the violation into a string for debugging purposes. + * + * @return string The violation as string + */ + public function __toString() + { + if (\is_object($this->root)) { + $class = 'Object('.\get_class($this->root).')'; + } elseif (\is_array($this->root)) { + $class = 'Array'; + } else { + $class = (string) $this->root; + } + + $propertyPath = (string) $this->propertyPath; + $code = $this->code; + + if ('' !== $propertyPath && '[' !== $propertyPath[0] && '' !== $class) { + $class .= '.'; + } + + if (!empty($code)) { + $code = ' (code '.$code.')'; + } + + return $class.$propertyPath.":\n ".$this->getMessage().$code; + } + + /** + * {@inheritdoc} + */ + public function getMessageTemplate() + { + return $this->messageTemplate; + } + + /** + * {@inheritdoc} + * + * @deprecated since version 2.7, to be removed in 3.0. + * Use getParameters() instead + */ + public function getMessageParameters() + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.7, to be removed in 3.0. Use the ConstraintViolation::getParameters() method instead.', E_USER_DEPRECATED); + + return $this->parameters; + } + + /** + * Alias of {@link getMessageParameters()}. + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * {@inheritdoc} + * + * @deprecated since version 2.7, to be removed in 3.0. + * Use getPlural() instead + */ + public function getMessagePluralization() + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.7, to be removed in 3.0. Use the ConstraintViolation::getPlural() method instead.', E_USER_DEPRECATED); + + return $this->plural; + } + + /** + * Alias of {@link getMessagePluralization()}. + */ + public function getPlural() + { + return $this->plural; + } + + /** + * {@inheritdoc} + */ + public function getMessage() + { + return $this->message; + } + + /** + * {@inheritdoc} + */ + public function getRoot() + { + return $this->root; + } + + /** + * {@inheritdoc} + */ + public function getPropertyPath() + { + return $this->propertyPath; + } + + /** + * {@inheritdoc} + */ + public function getInvalidValue() + { + return $this->invalidValue; + } + + /** + * Returns the constraint whose validation caused the violation. + * + * @return Constraint|null The constraint or null if it is not known + */ + public function getConstraint() + { + return $this->constraint; + } + + /** + * Returns the cause of the violation. + * + * @return mixed + */ + public function getCause() + { + return $this->cause; + } + + /** + * {@inheritdoc} + */ + public function getCode() + { + return $this->code; + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintViolationInterface.php b/public/system/storage/vendor/symfony/validator/ConstraintViolationInterface.php new file mode 100644 index 0000000..0ab53b0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintViolationInterface.php @@ -0,0 +1,123 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * A violation of a constraint that happened during validation. + * + * For each constraint that fails during validation one or more violations are + * created. The violations store the violation message, the path to the failing + * element in the validation graph and the root element that was originally + * passed to the validator. For example, take the following graph: + * + * (Person)---(firstName: string) + * \ + * (address: Address)---(street: string) + * + * If the <tt>Person</tt> object is validated and validation fails for the + * "firstName" property, the generated violation has the <tt>Person</tt> + * instance as root and the property path "firstName". If validation fails + * for the "street" property of the related <tt>Address</tt> instance, the root + * element is still the person, but the property path is "address.street". + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ConstraintViolationInterface +{ + /** + * Returns the violation message. + * + * @return string The violation message + */ + public function getMessage(); + + /** + * Returns the raw violation message. + * + * The raw violation message contains placeholders for the parameters + * returned by {@link getMessageParameters}. Typically you'll pass the + * message template and parameters to a translation engine. + * + * @return string The raw violation message + */ + public function getMessageTemplate(); + + /** + * Returns the parameters to be inserted into the raw violation message. + * + * @return array a possibly empty list of parameters indexed by the names + * that appear in the message template + * + * @see getMessageTemplate() + * @deprecated since version 2.7, to be replaced by getParameters() in 3.0. + */ + public function getMessageParameters(); + + /** + * Returns a number for pluralizing the violation message. + * + * For example, the message template could have different translation based + * on a parameter "choices": + * + * <ul> + * <li>Please select exactly one entry. (choices=1)</li> + * <li>Please select two entries. (choices=2)</li> + * </ul> + * + * This method returns the value of the parameter for choosing the right + * pluralization form (in this case "choices"). + * + * @return int|null The number to use to pluralize of the message + * + * @deprecated since version 2.7, to be replaced by getPlural() in 3.0. + */ + public function getMessagePluralization(); + + /** + * Returns the root element of the validation. + * + * @return mixed The value that was passed originally to the validator when + * the validation was started. Because the validator traverses + * the object graph, the value at which the violation occurs + * is not necessarily the value that was originally validated. + */ + public function getRoot(); + + /** + * Returns the property path from the root element to the violation. + * + * @return string The property path indicates how the validator reached + * the invalid value from the root element. If the root + * element is a <tt>Person</tt> instance with a property + * "address" that contains an <tt>Address</tt> instance + * with an invalid property "street", the generated property + * path is "address.street". Property access is denoted by + * dots, while array access is denoted by square brackets, + * for example "addresses[1].street". + */ + public function getPropertyPath(); + + /** + * Returns the value that caused the violation. + * + * @return mixed the invalid value that caused the validated constraint to + * fail + */ + public function getInvalidValue(); + + /** + * Returns a machine-digestible error code for the violation. + * + * @return string|null The error code + */ + public function getCode(); +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintViolationList.php b/public/system/storage/vendor/symfony/validator/ConstraintViolationList.php new file mode 100644 index 0000000..feb1732 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintViolationList.php @@ -0,0 +1,161 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Default implementation of {@ConstraintViolationListInterface}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class ConstraintViolationList implements \IteratorAggregate, ConstraintViolationListInterface +{ + /** + * @var ConstraintViolationInterface[] + */ + private $violations = array(); + + /** + * Creates a new constraint violation list. + * + * @param ConstraintViolationInterface[] $violations The constraint violations to add to the list + */ + public function __construct(array $violations = array()) + { + foreach ($violations as $violation) { + $this->add($violation); + } + } + + /** + * Converts the violation into a string for debugging purposes. + * + * @return string The violation as string + */ + public function __toString() + { + $string = ''; + + foreach ($this->violations as $violation) { + $string .= $violation."\n"; + } + + return $string; + } + + /** + * {@inheritdoc} + */ + public function add(ConstraintViolationInterface $violation) + { + $this->violations[] = $violation; + } + + /** + * {@inheritdoc} + */ + public function addAll(ConstraintViolationListInterface $otherList) + { + foreach ($otherList as $violation) { + $this->violations[] = $violation; + } + } + + /** + * {@inheritdoc} + */ + public function get($offset) + { + if (!isset($this->violations[$offset])) { + throw new \OutOfBoundsException(sprintf('The offset "%s" does not exist.', $offset)); + } + + return $this->violations[$offset]; + } + + /** + * {@inheritdoc} + */ + public function has($offset) + { + return isset($this->violations[$offset]); + } + + /** + * {@inheritdoc} + */ + public function set($offset, ConstraintViolationInterface $violation) + { + $this->violations[$offset] = $violation; + } + + /** + * {@inheritdoc} + */ + public function remove($offset) + { + unset($this->violations[$offset]); + } + + /** + * {@inheritdoc} + * + * @return \ArrayIterator|ConstraintViolationInterface[] + */ + public function getIterator() + { + return new \ArrayIterator($this->violations); + } + + /** + * {@inheritdoc} + */ + public function count() + { + return \count($this->violations); + } + + /** + * {@inheritdoc} + */ + public function offsetExists($offset) + { + return $this->has($offset); + } + + /** + * {@inheritdoc} + */ + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * {@inheritdoc} + */ + public function offsetSet($offset, $violation) + { + if (null === $offset) { + $this->add($violation); + } else { + $this->set($offset, $violation); + } + } + + /** + * {@inheritdoc} + */ + public function offsetUnset($offset) + { + $this->remove($offset); + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintViolationListInterface.php b/public/system/storage/vendor/symfony/validator/ConstraintViolationListInterface.php new file mode 100644 index 0000000..0489ab5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintViolationListInterface.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * A list of constraint violations. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ConstraintViolationListInterface extends \Traversable, \Countable, \ArrayAccess +{ + /** + * Adds a constraint violation to this list. + */ + public function add(ConstraintViolationInterface $violation); + + /** + * Merges an existing violation list into this list. + */ + public function addAll(ConstraintViolationListInterface $otherList); + + /** + * Returns the violation at a given offset. + * + * @param int $offset The offset of the violation + * + * @return ConstraintViolationInterface The violation + * + * @throws \OutOfBoundsException if the offset does not exist + */ + public function get($offset); + + /** + * Returns whether the given offset exists. + * + * @param int $offset The violation offset + * + * @return bool Whether the offset exists + */ + public function has($offset); + + /** + * Sets a violation at a given offset. + * + * @param int $offset The violation offset + * @param ConstraintViolationInterface $violation The violation + */ + public function set($offset, ConstraintViolationInterface $violation); + + /** + * Removes a violation at a given offset. + * + * @param int $offset The offset to remove + */ + public function remove($offset); +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparison.php b/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparison.php new file mode 100644 index 0000000..15afebb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparison.php @@ -0,0 +1,51 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * Used for the comparison of values. + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class AbstractComparison extends Constraint +{ + public $message; + public $value; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + if (null === $options) { + $options = array(); + } + + if (\is_array($options) && !isset($options['value'])) { + throw new ConstraintDefinitionException(sprintf('The %s constraint requires the "value" option to be set.', \get_class($this))); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'value'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php new file mode 100644 index 0000000..9620ead --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php @@ -0,0 +1,94 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Provides a base class for the validation of property comparisons. + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class AbstractComparisonValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof AbstractComparison) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\AbstractComparison'); + } + + if (null === $value) { + return; + } + + $comparedValue = $constraint->value; + + // Convert strings to DateTimes if comparing another DateTime + // This allows to compare with any date/time value supported by + // the DateTime constructor: + // http://php.net/manual/en/datetime.formats.php + if (\is_string($comparedValue)) { + if ($value instanceof \DateTimeImmutable) { + // If $value is immutable, convert the compared value to a + // DateTimeImmutable too + $comparedValue = new \DateTimeImmutable($comparedValue); + } elseif ($value instanceof \DateTime || $value instanceof \DateTimeInterface) { + // Otherwise use DateTime + $comparedValue = new \DateTime($comparedValue); + } + } + + if (!$this->compareValues($value, $comparedValue)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value, self::OBJECT_TO_STRING | self::PRETTY_DATE)) + ->setParameter('{{ compared_value }}', $this->formatValue($comparedValue, self::OBJECT_TO_STRING | self::PRETTY_DATE)) + ->setParameter('{{ compared_value_type }}', $this->formatTypeOf($comparedValue)) + ->setCode($this->getErrorCode()) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value, self::OBJECT_TO_STRING | self::PRETTY_DATE)) + ->setParameter('{{ compared_value }}', $this->formatValue($comparedValue, self::OBJECT_TO_STRING | self::PRETTY_DATE)) + ->setParameter('{{ compared_value_type }}', $this->formatTypeOf($comparedValue)) + ->setCode($this->getErrorCode()) + ->addViolation(); + } + } + } + + /** + * Compares the two given values to find if their relationship is valid. + * + * @param mixed $value1 The first value to compare + * @param mixed $value2 The second value to compare + * + * @return bool true if the relationship is valid, false otherwise + */ + abstract protected function compareValues($value1, $value2); + + /** + * Returns the error code used if the comparison fails. + * + * @return string|null The error code or `null` if no code should be set + */ + protected function getErrorCode() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/All.php b/public/system/storage/vendor/symfony/validator/Constraints/All.php new file mode 100644 index 0000000..b531a1d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/All.php @@ -0,0 +1,38 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class All extends Composite +{ + public $constraints = array(); + + public function getDefaultOption() + { + return 'constraints'; + } + + public function getRequiredOptions() + { + return array('constraints'); + } + + protected function getCompositeOption() + { + return 'constraints'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/AllValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/AllValidator.php new file mode 100644 index 0000000..fa763c5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/AllValidator.php @@ -0,0 +1,56 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class AllValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof All) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\All'); + } + + if (null === $value) { + return; + } + + if (!\is_array($value) && !$value instanceof \Traversable) { + throw new UnexpectedTypeException($value, 'array or Traversable'); + } + + $context = $this->context; + + if ($context instanceof ExecutionContextInterface) { + $validator = $context->getValidator()->inContext($context); + + foreach ($value as $key => $element) { + $validator->atPath('['.$key.']')->validate($element, $constraint->constraints); + } + } else { + // 2.4 API + foreach ($value as $key => $element) { + $context->validateValue($element, $constraint->constraints, '['.$key.']'); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Bic.php b/public/system/storage/vendor/symfony/validator/Constraints/Bic.php new file mode 100644 index 0000000..dee5d52 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Bic.php @@ -0,0 +1,39 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Michael Hirschler <michael.vhirsch@gmail.com> + */ +class Bic extends Constraint +{ + const INVALID_LENGTH_ERROR = '66dad313-af0b-4214-8566-6c799be9789c'; + const INVALID_CHARACTERS_ERROR = 'f424c529-7add-4417-8f2d-4b656e4833e2'; + const INVALID_BANK_CODE_ERROR = '00559357-6170-4f29-aebd-d19330aa19cf'; + const INVALID_COUNTRY_CODE_ERROR = '1ce76f8d-3c1f-451c-9e62-fe9c3ed486ae'; + const INVALID_CASE_ERROR = '11884038-3312-4ae5-9d04-699f782130c7'; + + protected static $errorNames = array( + self::INVALID_LENGTH_ERROR => 'INVALID_LENGTH_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_BANK_CODE_ERROR => 'INVALID_BANK_CODE_ERROR', + self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', + self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', + ); + + public $message = 'This is not a valid Business Identifier Code (BIC).'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/BicValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/BicValidator.php new file mode 100644 index 0000000..2a27bef --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/BicValidator.php @@ -0,0 +1,90 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Michael Hirschler <michael.vhirsch@gmail.com> + * + * @see https://en.wikipedia.org/wiki/ISO_9362#Structure + */ +class BicValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Bic) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Bic'); + } + + if (null === $value || '' === $value) { + return; + } + + $canonicalize = str_replace(' ', '', $value); + + // the bic must be either 8 or 11 characters long + if (!\in_array(\strlen($canonicalize), array(8, 11))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_LENGTH_ERROR) + ->addViolation(); + + return; + } + + // must contain alphanumeric values only + if (!ctype_alnum($canonicalize)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + // first 4 letters must be alphabetic (bank code) + if (!ctype_alpha(substr($canonicalize, 0, 4))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_BANK_CODE_ERROR) + ->addViolation(); + + return; + } + + // next 2 letters must be alphabetic (country code) + if (!ctype_alpha(substr($canonicalize, 4, 2))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_COUNTRY_CODE_ERROR) + ->addViolation(); + + return; + } + + // should contain uppercase characters only + if (strtoupper($canonicalize) !== $canonicalize) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_CASE_ERROR) + ->addViolation(); + + return; + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Blank.php b/public/system/storage/vendor/symfony/validator/Constraints/Blank.php new file mode 100644 index 0000000..030b21f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Blank.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Blank extends Constraint +{ + const NOT_BLANK_ERROR = '183ad2de-533d-4796-a439-6d3c3852b549'; + + protected static $errorNames = array( + self::NOT_BLANK_ERROR => 'NOT_BLANK_ERROR', + ); + + public $message = 'This value should be blank.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/BlankValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/BlankValidator.php new file mode 100644 index 0000000..7e4d738 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/BlankValidator.php @@ -0,0 +1,47 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class BlankValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Blank) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Blank'); + } + + if ('' !== $value && null !== $value) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Blank::NOT_BLANK_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Blank::NOT_BLANK_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Callback.php b/public/system/storage/vendor/symfony/validator/Constraints/Callback.php new file mode 100644 index 0000000..592ae00 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Callback.php @@ -0,0 +1,77 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Callback extends Constraint +{ + /** + * @var string|callable + */ + public $callback; + + /** + * @var array + * + * @deprecated since version 2.4, to be removed in 3.0. + */ + public $methods; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + // Invocation through annotations with an array parameter only + if (\is_array($options) && 1 === \count($options) && isset($options['value'])) { + $options = $options['value']; + } + + if (\is_array($options) && isset($options['methods'])) { + @trigger_error('The "methods" option of the '.__CLASS__.' class is deprecated since Symfony 2.4 and will be removed in 3.0. Use the "callback" option instead.', E_USER_DEPRECATED); + } + + if (\is_array($options) && !isset($options['callback']) && !isset($options['methods']) && !isset($options['groups']) && !isset($options['payload'])) { + if (\is_callable($options) || !$options) { + $options = array('callback' => $options); + } else { + // @deprecated, to be removed in 3.0 + $options = array('methods' => $options); + } + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'callback'; + } + + /** + * {@inheritdoc} + */ + public function getTargets() + { + return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CallbackValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CallbackValidator.php new file mode 100644 index 0000000..d4b440f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CallbackValidator.php @@ -0,0 +1,74 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validator for Callback constraint. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CallbackValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($object, Constraint $constraint) + { + if (!$constraint instanceof Callback) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Callback'); + } + + if (null !== $constraint->callback && null !== $constraint->methods) { + throw new ConstraintDefinitionException('The Callback constraint supports either the option "callback" or "methods", but not both at the same time.'); + } + + // has to be an array so that we can differentiate between callables + // and method names + if (null !== $constraint->methods && !\is_array($constraint->methods)) { + throw new UnexpectedTypeException($constraint->methods, 'array'); + } + + $methods = $constraint->methods ?: array($constraint->callback); + + foreach ($methods as $method) { + if ($method instanceof \Closure) { + $method($object, $this->context); + } elseif (\is_array($method)) { + if (!\is_callable($method)) { + if (isset($method[0]) && \is_object($method[0])) { + $method[0] = \get_class($method[0]); + } + throw new ConstraintDefinitionException(sprintf('%s targeted by Callback constraint is not a valid callable', json_encode($method))); + } + + \call_user_func($method, $object, $this->context); + } elseif (null !== $object) { + if (!method_exists($object, $method)) { + throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist in class %s', $method, \get_class($object))); + } + + $reflMethod = new \ReflectionMethod($object, $method); + + if ($reflMethod->isStatic()) { + $reflMethod->invoke(null, $object, $this->context); + } else { + $reflMethod->invoke($object, $this->context); + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CardScheme.php b/public/system/storage/vendor/symfony/validator/Constraints/CardScheme.php new file mode 100644 index 0000000..40c32e8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CardScheme.php @@ -0,0 +1,47 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * Metadata for the CardSchemeValidator. + * + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Tim Nagel <t.nagel@infinite.net.au> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CardScheme extends Constraint +{ + const NOT_NUMERIC_ERROR = 'a2ad9231-e827-485f-8a1e-ef4d9a6d5c2e'; + const INVALID_FORMAT_ERROR = 'a8faedbf-1c2f-4695-8d22-55783be8efed'; + + protected static $errorNames = array( + self::NOT_NUMERIC_ERROR => 'NOT_NUMERIC_ERROR', + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + ); + + public $message = 'Unsupported card type or invalid card number.'; + public $schemes; + + public function getDefaultOption() + { + return 'schemes'; + } + + public function getRequiredOptions() + { + return array('schemes'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CardSchemeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CardSchemeValidator.php new file mode 100644 index 0000000..f667bde --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CardSchemeValidator.php @@ -0,0 +1,143 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates that a card number belongs to a specified scheme. + * + * @author Tim Nagel <t.nagel@infinite.net.au> + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see http://en.wikipedia.org/wiki/Bank_card_number + * @see http://www.regular-expressions.info/creditcard.html + * @see http://www.barclaycard.co.uk/business/files/Ranges_and_Rules_September_2014.pdf + */ +class CardSchemeValidator extends ConstraintValidator +{ + protected $schemes = array( + // American Express card numbers start with 34 or 37 and have 15 digits. + 'AMEX' => array( + '/^3[47][0-9]{13}$/', + ), + // China UnionPay cards start with 62 and have between 16 and 19 digits. + // Please note that these cards do not follow Luhn Algorithm as a checksum. + 'CHINA_UNIONPAY' => array( + '/^62[0-9]{14,17}$/', + ), + // Diners Club card numbers begin with 300 through 305, 36 or 38. All have 14 digits. + // There are Diners Club cards that begin with 5 and have 16 digits. + // These are a joint venture between Diners Club and MasterCard, and should be processed like a MasterCard. + 'DINERS' => array( + '/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/', + ), + // Discover card numbers begin with 6011, 622126 through 622925, 644 through 649 or 65. + // All have 16 digits. + 'DISCOVER' => array( + '/^6011[0-9]{12}$/', + '/^64[4-9][0-9]{13}$/', + '/^65[0-9]{14}$/', + '/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/', + ), + // InstaPayment cards begin with 637 through 639 and have 16 digits. + 'INSTAPAYMENT' => array( + '/^63[7-9][0-9]{13}$/', + ), + // JCB cards beginning with 2131 or 1800 have 15 digits. + // JCB cards beginning with 35 have 16 digits. + 'JCB' => array( + '/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/', + ), + // Laser cards begin with either 6304, 6706, 6709 or 6771 and have between 16 and 19 digits. + 'LASER' => array( + '/^(6304|670[69]|6771)[0-9]{12,15}$/', + ), + // Maestro international cards begin with 675900..675999 and have between 12 and 19 digits. + // Maestro UK cards begin with either 500000..509999 or 560000..699999 and have between 12 and 19 digits. + 'MAESTRO' => array( + '/^(6759[0-9]{2})[0-9]{6,13}$/', + '/^(50[0-9]{4})[0-9]{6,13}$/', + '/^5[6-9][0-9]{10,17}$/', + '/^6[0-9]{11,18}$/', + ), + // All MasterCard numbers start with the numbers 51 through 55. All have 16 digits. + // October 2016 MasterCard numbers can also start with 222100 through 272099. + 'MASTERCARD' => array( + '/^5[1-5][0-9]{14}$/', + '/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/', + ), + // All Visa card numbers start with a 4 and have a length of 13, 16, or 19 digits. + 'VISA' => array( + '/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/', + ), + ); + + /** + * Validates a creditcard belongs to a specified scheme. + * + * @param mixed $value + * @param Constraint $constraint + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof CardScheme) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\CardScheme'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_numeric($value)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(CardScheme::NOT_NUMERIC_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(CardScheme::NOT_NUMERIC_ERROR) + ->addViolation(); + } + + return; + } + + $schemes = array_flip((array) $constraint->schemes); + $schemeRegexes = array_intersect_key($this->schemes, $schemes); + + foreach ($schemeRegexes as $regexes) { + foreach ($regexes as $regex) { + if (preg_match($regex, $value)) { + return; + } + } + } + + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(CardScheme::INVALID_FORMAT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(CardScheme::INVALID_FORMAT_ERROR) + ->addViolation(); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Choice.php b/public/system/storage/vendor/symfony/validator/Constraints/Choice.php new file mode 100644 index 0000000..4b93c70 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Choice.php @@ -0,0 +1,52 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Choice extends Constraint +{ + const NO_SUCH_CHOICE_ERROR = '8e179f1b-97aa-4560-a02f-2a8b42e49df7'; + const TOO_FEW_ERROR = '11edd7eb-5872-4b6e-9f12-89923999fd0e'; + const TOO_MANY_ERROR = '9bd98e49-211c-433f-8630-fd1c2d0f08c3'; + + protected static $errorNames = array( + self::NO_SUCH_CHOICE_ERROR => 'NO_SUCH_CHOICE_ERROR', + self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', + self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', + ); + + public $choices; + public $callback; + public $multiple = false; + public $strict = false; + public $min; + public $max; + public $message = 'The value you selected is not a valid choice.'; + public $multipleMessage = 'One or more of the given values is invalid.'; + public $minMessage = 'You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.'; + public $maxMessage = 'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.'; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'choices'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/ChoiceValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/ChoiceValidator.php new file mode 100644 index 0000000..b92ba61 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/ChoiceValidator.php @@ -0,0 +1,133 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * ChoiceValidator validates that the value is one of the expected values. + * + * @author Fabien Potencier <fabien@symfony.com> + * @author Florian Eckerstorfer <florian@eckerstorfer.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class ChoiceValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Choice) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Choice'); + } + + if (!\is_array($constraint->choices) && !$constraint->callback) { + throw new ConstraintDefinitionException('Either "choices" or "callback" must be specified on constraint Choice'); + } + + if (null === $value) { + return; + } + + if ($constraint->multiple && !\is_array($value)) { + throw new UnexpectedTypeException($value, 'array'); + } + + if ($constraint->callback) { + if (!\is_callable($choices = array($this->context->getClassName(), $constraint->callback)) + && !\is_callable($choices = $constraint->callback) + ) { + throw new ConstraintDefinitionException('The Choice constraint expects a valid callback'); + } + $choices = \call_user_func($choices); + } else { + $choices = $constraint->choices; + } + + if ($constraint->multiple) { + foreach ($value as $_value) { + if (!\in_array($_value, $choices, $constraint->strict)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->multipleMessage) + ->setParameter('{{ value }}', $this->formatValue($_value)) + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->setInvalidValue($_value) + ->addViolation(); + } else { + $this->buildViolation($constraint->multipleMessage) + ->setParameter('{{ value }}', $this->formatValue($_value)) + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->setInvalidValue($_value) + ->addViolation(); + } + + return; + } + } + + $count = \count($value); + + if (null !== $constraint->min && $count < $constraint->min) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->minMessage) + ->setParameter('{{ limit }}', $constraint->min) + ->setPlural((int) $constraint->min) + ->setCode(Choice::TOO_FEW_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->minMessage) + ->setParameter('{{ limit }}', $constraint->min) + ->setPlural((int) $constraint->min) + ->setCode(Choice::TOO_FEW_ERROR) + ->addViolation(); + } + + return; + } + + if (null !== $constraint->max && $count > $constraint->max) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->maxMessage) + ->setParameter('{{ limit }}', $constraint->max) + ->setPlural((int) $constraint->max) + ->setCode(Choice::TOO_MANY_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->maxMessage) + ->setParameter('{{ limit }}', $constraint->max) + ->setPlural((int) $constraint->max) + ->setCode(Choice::TOO_MANY_ERROR) + ->addViolation(); + } + + return; + } + } elseif (!\in_array($value, $choices, $constraint->strict)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Collection.php b/public/system/storage/vendor/symfony/validator/Constraints/Collection.php new file mode 100644 index 0000000..2b5679b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Collection.php @@ -0,0 +1,85 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Collection extends Composite +{ + const MISSING_FIELD_ERROR = '2fa2158c-2a7f-484b-98aa-975522539ff8'; + const NO_SUCH_FIELD_ERROR = '7703c766-b5d5-4cef-ace7-ae0dd82304e9'; + + protected static $errorNames = array( + self::MISSING_FIELD_ERROR => 'MISSING_FIELD_ERROR', + self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR', + ); + + public $fields = array(); + public $allowExtraFields = false; + public $allowMissingFields = false; + public $extraFieldsMessage = 'This field was not expected.'; + public $missingFieldsMessage = 'This field is missing.'; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + // no known options set? $options is the fields array + if (\is_array($options) + && !array_intersect(array_keys($options), array('groups', 'fields', 'allowExtraFields', 'allowMissingFields', 'extraFieldsMessage', 'missingFieldsMessage'))) { + $options = array('fields' => $options); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + protected function initializeNestedConstraints() + { + parent::initializeNestedConstraints(); + + if (!\is_array($this->fields)) { + throw new ConstraintDefinitionException(sprintf('The option "fields" is expected to be an array in constraint %s', __CLASS__)); + } + + foreach ($this->fields as $fieldName => $field) { + // the XmlFileLoader and YamlFileLoader pass the field Optional + // and Required constraint as an array with exactly one element + if (\is_array($field) && 1 == \count($field)) { + $this->fields[$fieldName] = $field = $field[0]; + } + + if (!$field instanceof Optional && !$field instanceof Required) { + $this->fields[$fieldName] = $field = new Required($field); + } + } + } + + public function getRequiredOptions() + { + return array('fields'); + } + + protected function getCompositeOption() + { + return 'fields'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Collection/Optional.php b/public/system/storage/vendor/symfony/validator/Constraints/Collection/Optional.php new file mode 100644 index 0000000..fbd3d7a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Collection/Optional.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints\Collection; + +@trigger_error('The '.__NAMESPACE__.'\Optional class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Optional class instead.', E_USER_DEPRECATED); + +use Symfony\Component\Validator\Constraints\Optional as BaseOptional; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Validator\Constraints\Optional} instead. + */ +class Optional extends BaseOptional +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Collection/Required.php b/public/system/storage/vendor/symfony/validator/Constraints/Collection/Required.php new file mode 100644 index 0000000..96f9bc2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Collection/Required.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints\Collection; + +@trigger_error('The '.__NAMESPACE__.'\Required class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Required class instead.', E_USER_DEPRECATED); + +use Symfony\Component\Validator\Constraints\Required as BaseRequired; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Validator\Constraints\Required} instead. + */ +class Required extends BaseRequired +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CollectionValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CollectionValidator.php new file mode 100644 index 0000000..c2aae3a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CollectionValidator.php @@ -0,0 +1,110 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CollectionValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Collection) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Collection'); + } + + if (null === $value) { + return; + } + + if (!\is_array($value) && !($value instanceof \Traversable && $value instanceof \ArrayAccess)) { + throw new UnexpectedTypeException($value, 'array or Traversable and ArrayAccess'); + } + + // We need to keep the initialized context when CollectionValidator + // calls itself recursively (Collection constraints can be nested). + // Since the context of the validator is overwritten when initialize() + // is called for the nested constraint, the outer validator is + // acting on the wrong context when the nested validation terminates. + // + // A better solution - which should be approached in Symfony 3.0 - is to + // remove the initialize() method and pass the context as last argument + // to validate() instead. + $context = $this->context; + + foreach ($constraint->fields as $field => $fieldConstraint) { + // bug fix issue #2779 + $existsInArray = \is_array($value) && array_key_exists($field, $value); + $existsInArrayAccess = $value instanceof \ArrayAccess && $value->offsetExists($field); + + if ($existsInArray || $existsInArrayAccess) { + if (\count($fieldConstraint->constraints) > 0) { + if ($context instanceof ExecutionContextInterface) { + $context->getValidator() + ->inContext($context) + ->atPath('['.$field.']') + ->validate($value[$field], $fieldConstraint->constraints); + } else { + // 2.4 API + $context->validateValue($value[$field], $fieldConstraint->constraints, '['.$field.']'); + } + } + } elseif (!$fieldConstraint instanceof Optional && !$constraint->allowMissingFields) { + if ($context instanceof ExecutionContextInterface) { + $context->buildViolation($constraint->missingFieldsMessage) + ->atPath('['.$field.']') + ->setParameter('{{ field }}', $this->formatValue($field)) + ->setInvalidValue(null) + ->setCode(Collection::MISSING_FIELD_ERROR) + ->addViolation(); + } else { + $this->buildViolationInContext($context, $constraint->missingFieldsMessage) + ->atPath('['.$field.']') + ->setParameter('{{ field }}', $this->formatValue($field)) + ->setInvalidValue(null) + ->setCode(Collection::MISSING_FIELD_ERROR) + ->addViolation(); + } + } + } + + if (!$constraint->allowExtraFields) { + foreach ($value as $field => $fieldValue) { + if (!isset($constraint->fields[$field])) { + if ($context instanceof ExecutionContextInterface) { + $context->buildViolation($constraint->extraFieldsMessage) + ->atPath('['.$field.']') + ->setParameter('{{ field }}', $this->formatValue($field)) + ->setInvalidValue($fieldValue) + ->setCode(Collection::NO_SUCH_FIELD_ERROR) + ->addViolation(); + } else { + $this->buildViolationInContext($context, $constraint->extraFieldsMessage) + ->atPath('['.$field.']') + ->setParameter('{{ field }}', $this->formatValue($field)) + ->setInvalidValue($fieldValue) + ->setCode(Collection::NO_SUCH_FIELD_ERROR) + ->addViolation(); + } + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Composite.php b/public/system/storage/vendor/symfony/validator/Constraints/Composite.php new file mode 100644 index 0000000..d233f06 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Composite.php @@ -0,0 +1,149 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * A constraint that is composed of other constraints. + * + * You should never use the nested constraint instances anywhere else, because + * their groups are adapted when passed to the constructor of this class. + * + * If you want to create your own composite constraint, extend this class and + * let {@link getCompositeOption()} return the name of the property which + * contains the nested constraints. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class Composite extends Constraint +{ + /** + * {@inheritdoc} + * + * The groups of the composite and its nested constraints are made + * consistent using the following strategy: + * + * - If groups are passed explicitly to the composite constraint, but + * not to the nested constraints, the options of the composite + * constraint are copied to the nested constraints; + * + * - If groups are passed explicitly to the nested constraints, but not + * to the composite constraint, the groups of all nested constraints + * are merged and used as groups for the composite constraint; + * + * - If groups are passed explicitly to both the composite and its nested + * constraints, the groups of the nested constraints must be a subset + * of the groups of the composite constraint. If not, a + * {@link ConstraintDefinitionException} is thrown. + * + * All this is done in the constructor, because constraints can then be + * cached. When constraints are loaded from the cache, no more group + * checks need to be done. + */ + public function __construct($options = null) + { + parent::__construct($options); + + $this->initializeNestedConstraints(); + + /* @var Constraint[] $nestedConstraints */ + $compositeOption = $this->getCompositeOption(); + $nestedConstraints = $this->$compositeOption; + + if (!\is_array($nestedConstraints)) { + $nestedConstraints = array($nestedConstraints); + } + + foreach ($nestedConstraints as $constraint) { + if (!$constraint instanceof Constraint) { + if (\is_object($constraint)) { + $constraint = \get_class($constraint); + } + + throw new ConstraintDefinitionException(sprintf('The value %s is not an instance of Constraint in constraint %s', $constraint, \get_class($this))); + } + + if ($constraint instanceof Valid) { + throw new ConstraintDefinitionException(sprintf('The constraint Valid cannot be nested inside constraint %s. You can only declare the Valid constraint directly on a field or method.', \get_class($this))); + } + } + + if (!property_exists($this, 'groups')) { + $mergedGroups = array(); + + foreach ($nestedConstraints as $constraint) { + foreach ($constraint->groups as $group) { + $mergedGroups[$group] = true; + } + } + + $this->groups = array_keys($mergedGroups); + $this->$compositeOption = $nestedConstraints; + + return; + } + + foreach ($nestedConstraints as $constraint) { + if (property_exists($constraint, 'groups')) { + $excessGroups = array_diff($constraint->groups, $this->groups); + + if (\count($excessGroups) > 0) { + throw new ConstraintDefinitionException(sprintf('The group(s) "%s" passed to the constraint %s should also be passed to its containing constraint %s', implode('", "', $excessGroups), \get_class($constraint), \get_class($this))); + } + } else { + $constraint->groups = $this->groups; + } + } + + $this->$compositeOption = $nestedConstraints; + } + + /** + * {@inheritdoc} + * + * Implicit group names are forwarded to nested constraints. + * + * @param string $group + */ + public function addImplicitGroupName($group) + { + parent::addImplicitGroupName($group); + + /** @var Constraint[] $nestedConstraints */ + $nestedConstraints = $this->{$this->getCompositeOption()}; + + foreach ($nestedConstraints as $constraint) { + $constraint->addImplicitGroupName($group); + } + } + + /** + * Returns the name of the property that contains the nested constraints. + * + * @return string The property name + */ + abstract protected function getCompositeOption(); + + /** + * Initializes the nested constraints. + * + * This method can be overwritten in subclasses to clean up the nested + * constraints passed to the constructor. + * + * @see Collection::initializeNestedConstraints() + */ + protected function initializeNestedConstraints() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Count.php b/public/system/storage/vendor/symfony/validator/Constraints/Count.php new file mode 100644 index 0000000..0a54ee7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Count.php @@ -0,0 +1,54 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Count extends Constraint +{ + const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69'; + const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169'; + + protected static $errorNames = array( + self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', + self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', + ); + + public $minMessage = 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.'; + public $maxMessage = 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.'; + public $exactMessage = 'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.'; + public $min; + public $max; + + public function __construct($options = null) + { + if (null !== $options && !\is_array($options)) { + $options = array( + 'min' => $options, + 'max' => $options, + ); + } + + parent::__construct($options); + + if (null === $this->min && null === $this->max) { + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CountValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CountValidator.php new file mode 100644 index 0000000..45be996 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CountValidator.php @@ -0,0 +1,85 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CountValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Count) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Count'); + } + + if (null === $value) { + return; + } + + if (!\is_array($value) && !$value instanceof \Countable) { + throw new UnexpectedTypeException($value, 'array or \Countable'); + } + + $count = \count($value); + + if (null !== $constraint->max && $count > $constraint->max) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->maxMessage) + ->setParameter('{{ count }}', $count) + ->setParameter('{{ limit }}', $constraint->max) + ->setInvalidValue($value) + ->setPlural((int) $constraint->max) + ->setCode(Count::TOO_MANY_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->maxMessage) + ->setParameter('{{ count }}', $count) + ->setParameter('{{ limit }}', $constraint->max) + ->setInvalidValue($value) + ->setPlural((int) $constraint->max) + ->setCode(Count::TOO_MANY_ERROR) + ->addViolation(); + } + + return; + } + + if (null !== $constraint->min && $count < $constraint->min) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->minMessage) + ->setParameter('{{ count }}', $count) + ->setParameter('{{ limit }}', $constraint->min) + ->setInvalidValue($value) + ->setPlural((int) $constraint->min) + ->setCode(Count::TOO_FEW_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->minMessage) + ->setParameter('{{ count }}', $count) + ->setParameter('{{ limit }}', $constraint->min) + ->setInvalidValue($value) + ->setPlural((int) $constraint->min) + ->setCode(Count::TOO_FEW_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Country.php b/public/system/storage/vendor/symfony/validator/Constraints/Country.php new file mode 100644 index 0000000..1b76570 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Country.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Country extends Constraint +{ + const NO_SUCH_COUNTRY_ERROR = '8f900c12-61bd-455d-9398-996cd040f7f0'; + + protected static $errorNames = array( + self::NO_SUCH_COUNTRY_ERROR => 'NO_SUCH_COUNTRY_ERROR', + ); + + public $message = 'This value is not a valid country.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CountryValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CountryValidator.php new file mode 100644 index 0000000..437b3d6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CountryValidator.php @@ -0,0 +1,61 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid country code. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CountryValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Country) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Country'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $countries = Intl::getRegionBundle()->getCountryNames(); + + if (!isset($countries[$value])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Country::NO_SUCH_COUNTRY_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Country::NO_SUCH_COUNTRY_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Currency.php b/public/system/storage/vendor/symfony/validator/Constraints/Currency.php new file mode 100644 index 0000000..d28f94c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Currency.php @@ -0,0 +1,32 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Miha Vrhovnik <miha.vrhovnik@pagein.si> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Currency extends Constraint +{ + const NO_SUCH_CURRENCY_ERROR = '69945ac1-2db4-405f-bec7-d2772f73df52'; + + protected static $errorNames = array( + self::NO_SUCH_CURRENCY_ERROR => 'NO_SUCH_CURRENCY_ERROR', + ); + + public $message = 'This value is not a valid currency.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CurrencyValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CurrencyValidator.php new file mode 100644 index 0000000..40e7920 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CurrencyValidator.php @@ -0,0 +1,62 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid currency. + * + * @author Miha Vrhovnik <miha.vrhovnik@pagein.si> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CurrencyValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Currency) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Currency'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $currencies = Intl::getCurrencyBundle()->getCurrencyNames(); + + if (!isset($currencies[$value])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Currency::NO_SUCH_CURRENCY_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Currency::NO_SUCH_CURRENCY_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Date.php b/public/system/storage/vendor/symfony/validator/Constraints/Date.php new file mode 100644 index 0000000..2563413 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Date.php @@ -0,0 +1,33 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Date extends Constraint +{ + const INVALID_FORMAT_ERROR = '69819696-02ac-4a99-9ff0-14e127c4d1bc'; + const INVALID_DATE_ERROR = '3c184ce5-b31d-4de7-8b76-326da7b2be93'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', + ); + + public $message = 'This value is not a valid date.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/DateTime.php b/public/system/storage/vendor/symfony/validator/Constraints/DateTime.php new file mode 100644 index 0000000..35e2934 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/DateTime.php @@ -0,0 +1,35 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class DateTime extends Constraint +{ + const INVALID_FORMAT_ERROR = '1a9da513-2640-4f84-9b6a-4d99dcddc628'; + const INVALID_DATE_ERROR = 'd52afa47-620d-4d99-9f08-f4d85b36e33c'; + const INVALID_TIME_ERROR = '5e797c9d-74f7-4098-baa3-94390c447b27'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', + self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', + ); + + public $message = 'This value is not a valid datetime.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/DateTimeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/DateTimeValidator.php new file mode 100644 index 0000000..3296935 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/DateTimeValidator.php @@ -0,0 +1,88 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class DateTimeValidator extends DateValidator +{ + const PATTERN = '/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/'; + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof DateTime) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\DateTime'); + } + + if (null === $value || '' === $value || $value instanceof \DateTime) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if (!preg_match(static::PATTERN, $value, $matches)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_FORMAT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_FORMAT_ERROR) + ->addViolation(); + } + + return; + } + + if (!DateValidator::checkDate($matches[1], $matches[2], $matches[3])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_DATE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_DATE_ERROR) + ->addViolation(); + } + } + + if (!TimeValidator::checkTime($matches[4], $matches[5], $matches[6])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_TIME_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_TIME_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/DateValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/DateValidator.php new file mode 100644 index 0000000..a4c95dc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/DateValidator.php @@ -0,0 +1,91 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class DateValidator extends ConstraintValidator +{ + const PATTERN = '/^(\d{4})-(\d{2})-(\d{2})$/'; + + /** + * Checks whether a date is valid. + * + * @param int $year The year + * @param int $month The month + * @param int $day The day + * + * @return bool Whether the date is valid + * + * @internal + */ + public static function checkDate($year, $month, $day) + { + return checkdate($month, $day, $year); + } + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Date) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Date'); + } + + if (null === $value || '' === $value || $value instanceof \DateTime) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if (!preg_match(static::PATTERN, $value, $matches)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Date::INVALID_FORMAT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Date::INVALID_FORMAT_ERROR) + ->addViolation(); + } + + return; + } + + if (!self::checkDate($matches[1], $matches[2], $matches[3])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Date::INVALID_DATE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Date::INVALID_DATE_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Email.php b/public/system/storage/vendor/symfony/validator/Constraints/Email.php new file mode 100644 index 0000000..a9d9ab1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Email.php @@ -0,0 +1,38 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Email extends Constraint +{ + const INVALID_FORMAT_ERROR = 'bd79c0ab-ddba-46cc-a703-a7a4b08de310'; + const MX_CHECK_FAILED_ERROR = 'bf447c1c-0266-4e10-9c6c-573df282e413'; + const HOST_CHECK_FAILED_ERROR = '7da53a8b-56f3-4288-bb3e-ee9ede4ef9a1'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'STRICT_CHECK_FAILED_ERROR', + self::MX_CHECK_FAILED_ERROR => 'MX_CHECK_FAILED_ERROR', + self::HOST_CHECK_FAILED_ERROR => 'HOST_CHECK_FAILED_ERROR', + ); + + public $message = 'This value is not a valid email address.'; + public $checkMX = false; + public $checkHost = false; + public $strict; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/EmailValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/EmailValidator.php new file mode 100644 index 0000000..2f0d25a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/EmailValidator.php @@ -0,0 +1,155 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\RuntimeException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class EmailValidator extends ConstraintValidator +{ + private $isStrict; + + /** + * @param bool $strict + */ + public function __construct($strict = false) + { + $this->isStrict = $strict; + } + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Email) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Email'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if (null === $constraint->strict) { + $constraint->strict = $this->isStrict; + } + + if ($constraint->strict) { + if (!class_exists('\Egulias\EmailValidator\EmailValidator') || interface_exists('\Egulias\EmailValidator\Validation\EmailValidation')) { + throw new RuntimeException('Strict email validation requires egulias/email-validator:~1.2'); + } + + $strictValidator = new \Egulias\EmailValidator\EmailValidator(); + + if (!$strictValidator->isValid($value, false, true)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::INVALID_FORMAT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::INVALID_FORMAT_ERROR) + ->addViolation(); + } + + return; + } + } elseif (!preg_match('/^.+\@\S+\.\S+$/', $value)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::INVALID_FORMAT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::INVALID_FORMAT_ERROR) + ->addViolation(); + } + + return; + } + + $host = (string) substr($value, strrpos($value, '@') + 1); + + // Check for host DNS resource records + if ($constraint->checkMX) { + if (!$this->checkMX($host)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::MX_CHECK_FAILED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::MX_CHECK_FAILED_ERROR) + ->addViolation(); + } + } + + return; + } + + if ($constraint->checkHost && !$this->checkHost($host)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::HOST_CHECK_FAILED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::HOST_CHECK_FAILED_ERROR) + ->addViolation(); + } + } + } + + /** + * Check DNS Records for MX type. + * + * @param string $host Host + * + * @return bool + */ + private function checkMX($host) + { + return '' !== $host && checkdnsrr($host, 'MX'); + } + + /** + * Check if one of MX, A or AAAA DNS RR exists. + * + * @param string $host Host + * + * @return bool + */ + private function checkHost($host) + { + return '' !== $host && ($this->checkMX($host) || (checkdnsrr($host, 'A') || checkdnsrr($host, 'AAAA'))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/EqualTo.php b/public/system/storage/vendor/symfony/validator/Constraints/EqualTo.php new file mode 100644 index 0000000..4b22c6d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/EqualTo.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class EqualTo extends AbstractComparison +{ + const NOT_EQUAL_ERROR = '478618a7-95ba-473d-9101-cabd45e49115'; + + protected static $errorNames = array( + self::NOT_EQUAL_ERROR => 'NOT_EQUAL_ERROR', + ); + + public $message = 'This value should be equal to {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/EqualToValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/EqualToValidator.php new file mode 100644 index 0000000..fe1f362 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/EqualToValidator.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are equal (==). + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class EqualToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 == $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return EqualTo::NOT_EQUAL_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Existence.php b/public/system/storage/vendor/symfony/validator/Constraints/Existence.php new file mode 100644 index 0000000..5ea6ffe --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Existence.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class Existence extends Composite +{ + public $constraints = array(); + + public function getDefaultOption() + { + return 'constraints'; + } + + protected function getCompositeOption() + { + return 'constraints'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Expression.php b/public/system/storage/vendor/symfony/validator/Constraints/Expression.php new file mode 100644 index 0000000..3329bd2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Expression.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Fabien Potencier <fabien@symfony.com> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Expression extends Constraint +{ + const EXPRESSION_FAILED_ERROR = '6b3befbc-2f01-4ddf-be21-b57898905284'; + + protected static $errorNames = array( + self::EXPRESSION_FAILED_ERROR => 'EXPRESSION_FAILED_ERROR', + ); + + public $message = 'This value is not valid.'; + public $expression; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'expression'; + } + + /** + * {@inheritdoc} + */ + public function getRequiredOptions() + { + return array('expression'); + } + + /** + * {@inheritdoc} + */ + public function getTargets() + { + return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); + } + + /** + * {@inheritdoc} + */ + public function validatedBy() + { + return 'validator.expression'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/ExpressionValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/ExpressionValidator.php new file mode 100644 index 0000000..85fc466 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/ExpressionValidator.php @@ -0,0 +1,110 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\PropertyAccess\PropertyPath; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\RuntimeException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Fabien Potencier <fabien@symfony.com> + * @author Bernhard Schussek <bschussek@symfony.com> + */ +class ExpressionValidator extends ConstraintValidator +{ + private $propertyAccessor; + private $expressionLanguage; + + public function __construct(PropertyAccessorInterface $propertyAccessor = null, ExpressionLanguage $expressionLanguage = null) + { + $this->propertyAccessor = $propertyAccessor; + $this->expressionLanguage = $expressionLanguage; + } + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Expression) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); + } + + $variables = array(); + + // Symfony 2.5+ + if ($this->context instanceof ExecutionContextInterface) { + $variables['value'] = $value; + $variables['this'] = $this->context->getObject(); + } elseif (null === $this->context->getPropertyName()) { + $variables['value'] = $value; + $variables['this'] = $value; + } else { + $root = $this->context->getRoot(); + $variables['value'] = $value; + + if (\is_object($root)) { + // Extract the object that the property belongs to from the object + // graph + $path = new PropertyPath($this->context->getPropertyPath()); + $parentPath = $path->getParent(); + $variables['this'] = $parentPath ? $this->getPropertyAccessor()->getValue($root, $parentPath) : $root; + } else { + $variables['this'] = null; + } + } + + if (!$this->getExpressionLanguage()->evaluate($constraint->expression, $variables)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value, self::OBJECT_TO_STRING)) + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value, self::OBJECT_TO_STRING)) + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->addViolation(); + } + } + } + + private function getExpressionLanguage() + { + if (null === $this->expressionLanguage) { + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); + } + $this->expressionLanguage = new ExpressionLanguage(); + } + + return $this->expressionLanguage; + } + + private function getPropertyAccessor() + { + if (null === $this->propertyAccessor) { + if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccess')) { + throw new RuntimeException('Unable to use expressions as the Symfony PropertyAccess component is not installed.'); + } + $this->propertyAccessor = PropertyAccess::createPropertyAccessor(); + } + + return $this->propertyAccessor; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/False.php b/public/system/storage/vendor/symfony/validator/Constraints/False.php new file mode 100644 index 0000000..40dcc8e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/False.php @@ -0,0 +1,26 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\False class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsFalse class in the same namespace instead.', E_USER_DEPRECATED); + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.7, to be removed in 3.0. Use IsFalse instead. + */ +class False extends IsFalse +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/FalseValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/FalseValidator.php new file mode 100644 index 0000000..c54a347 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/FalseValidator.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\FalseValidator class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsFalseValidator class in the same namespace instead.', E_USER_DEPRECATED); + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.7, to be removed in 3.0. Use IsFalseValidator instead. + */ +class FalseValidator extends IsFalseValidator +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/File.php b/public/system/storage/vendor/symfony/validator/Constraints/File.php new file mode 100644 index 0000000..c00ece3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/File.php @@ -0,0 +1,123 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @property int $maxSize + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class File extends Constraint +{ + // Check the Image constraint for clashes if adding new constants here + + const NOT_FOUND_ERROR = 'd2a3fb6e-7ddc-4210-8fbf-2ab345ce1998'; + const NOT_READABLE_ERROR = 'c20c92a4-5bfa-4202-9477-28e800e0f6ff'; + const EMPTY_ERROR = '5d743385-9775-4aa5-8ff5-495fb1e60137'; + const TOO_LARGE_ERROR = 'df8637af-d466-48c6-a59d-e7126250a654'; + const INVALID_MIME_TYPE_ERROR = '744f00bc-4389-4c74-92de-9a43cde55534'; + + protected static $errorNames = array( + self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', + self::NOT_READABLE_ERROR => 'NOT_READABLE_ERROR', + self::EMPTY_ERROR => 'EMPTY_ERROR', + self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR', + self::INVALID_MIME_TYPE_ERROR => 'INVALID_MIME_TYPE_ERROR', + ); + + public $binaryFormat; + public $mimeTypes = array(); + public $notFoundMessage = 'The file could not be found.'; + public $notReadableMessage = 'The file is not readable.'; + public $maxSizeMessage = 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.'; + public $mimeTypesMessage = 'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.'; + public $disallowEmptyMessage = 'An empty file is not allowed.'; + + public $uploadIniSizeErrorMessage = 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'; + public $uploadFormSizeErrorMessage = 'The file is too large.'; + public $uploadPartialErrorMessage = 'The file was only partially uploaded.'; + public $uploadNoFileErrorMessage = 'No file was uploaded.'; + public $uploadNoTmpDirErrorMessage = 'No temporary folder was configured in php.ini.'; + public $uploadCantWriteErrorMessage = 'Cannot write temporary file to disk.'; + public $uploadExtensionErrorMessage = 'A PHP extension caused the upload to fail.'; + public $uploadErrorMessage = 'The file could not be uploaded.'; + + protected $maxSize; + + public function __construct($options = null) + { + parent::__construct($options); + + if (null !== $this->maxSize) { + $this->normalizeBinaryFormat($this->maxSize); + } + } + + public function __set($option, $value) + { + if ('maxSize' === $option) { + $this->normalizeBinaryFormat($value); + + return; + } + + parent::__set($option, $value); + } + + public function __get($option) + { + if ('maxSize' === $option) { + return $this->maxSize; + } + + return parent::__get($option); + } + + public function __isset($option) + { + if ('maxSize' === $option) { + return true; + } + + return parent::__isset($option); + } + + private function normalizeBinaryFormat($maxSize) + { + $sizeInt = (int) $maxSize; + + if (ctype_digit((string) $maxSize)) { + $this->maxSize = $sizeInt; + $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; + } elseif (preg_match('/^\d++k$/i', $maxSize)) { + $this->maxSize = $sizeInt * 1000; + $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; + } elseif (preg_match('/^\d++M$/i', $maxSize)) { + $this->maxSize = $sizeInt * 1000000; + $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; + } elseif (preg_match('/^\d++Ki$/i', $maxSize)) { + $this->maxSize = $sizeInt << 10; + $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; + } elseif (preg_match('/^\d++Mi$/i', $maxSize)) { + $this->maxSize = $sizeInt << 20; + $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; + } else { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum size', $this->maxSize)); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/FileValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/FileValidator.php new file mode 100644 index 0000000..33c784b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/FileValidator.php @@ -0,0 +1,329 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\HttpFoundation\File\File as FileObject; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class FileValidator extends ConstraintValidator +{ + const KB_BYTES = 1000; + const MB_BYTES = 1000000; + const KIB_BYTES = 1024; + const MIB_BYTES = 1048576; + + private static $suffices = array( + 1 => 'bytes', + self::KB_BYTES => 'kB', + self::MB_BYTES => 'MB', + self::KIB_BYTES => 'KiB', + self::MIB_BYTES => 'MiB', + ); + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof File) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\File'); + } + + if (null === $value || '' === $value) { + return; + } + + if ($value instanceof UploadedFile && !$value->isValid()) { + switch ($value->getError()) { + case UPLOAD_ERR_INI_SIZE: + $iniLimitSize = UploadedFile::getMaxFilesize(); + if ($constraint->maxSize && $constraint->maxSize < $iniLimitSize) { + $limitInBytes = $constraint->maxSize; + $binaryFormat = $constraint->binaryFormat; + } else { + $limitInBytes = $iniLimitSize; + $binaryFormat = null === $constraint->binaryFormat ? true : $constraint->binaryFormat; + } + + list($sizeAsString, $limitAsString, $suffix) = $this->factorizeSizes(0, $limitInBytes, $binaryFormat); + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->uploadIniSizeErrorMessage) + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setCode(UPLOAD_ERR_INI_SIZE) + ->addViolation(); + } else { + $this->buildViolation($constraint->uploadIniSizeErrorMessage) + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setCode(UPLOAD_ERR_INI_SIZE) + ->addViolation(); + } + + return; + case UPLOAD_ERR_FORM_SIZE: + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->uploadFormSizeErrorMessage) + ->setCode(UPLOAD_ERR_FORM_SIZE) + ->addViolation(); + } else { + $this->buildViolation($constraint->uploadFormSizeErrorMessage) + ->setCode(UPLOAD_ERR_FORM_SIZE) + ->addViolation(); + } + + return; + case UPLOAD_ERR_PARTIAL: + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->uploadPartialErrorMessage) + ->setCode(UPLOAD_ERR_PARTIAL) + ->addViolation(); + } else { + $this->buildViolation($constraint->uploadPartialErrorMessage) + ->setCode(UPLOAD_ERR_PARTIAL) + ->addViolation(); + } + + return; + case UPLOAD_ERR_NO_FILE: + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->uploadNoFileErrorMessage) + ->setCode(UPLOAD_ERR_NO_FILE) + ->addViolation(); + } else { + $this->buildViolation($constraint->uploadNoFileErrorMessage) + ->setCode(UPLOAD_ERR_NO_FILE) + ->addViolation(); + } + + return; + case UPLOAD_ERR_NO_TMP_DIR: + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->uploadNoTmpDirErrorMessage) + ->setCode(UPLOAD_ERR_NO_TMP_DIR) + ->addViolation(); + } else { + $this->buildViolation($constraint->uploadNoTmpDirErrorMessage) + ->setCode(UPLOAD_ERR_NO_TMP_DIR) + ->addViolation(); + } + + return; + case UPLOAD_ERR_CANT_WRITE: + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->uploadCantWriteErrorMessage) + ->setCode(UPLOAD_ERR_CANT_WRITE) + ->addViolation(); + } else { + $this->buildViolation($constraint->uploadCantWriteErrorMessage) + ->setCode(UPLOAD_ERR_CANT_WRITE) + ->addViolation(); + } + + return; + case UPLOAD_ERR_EXTENSION: + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->uploadExtensionErrorMessage) + ->setCode(UPLOAD_ERR_EXTENSION) + ->addViolation(); + } else { + $this->buildViolation($constraint->uploadExtensionErrorMessage) + ->setCode(UPLOAD_ERR_EXTENSION) + ->addViolation(); + } + + return; + default: + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->uploadErrorMessage) + ->setCode($value->getError()) + ->addViolation(); + } else { + $this->buildViolation($constraint->uploadErrorMessage) + ->setCode($value->getError()) + ->addViolation(); + } + + return; + } + } + + if (!is_scalar($value) && !$value instanceof FileObject && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $path = $value instanceof FileObject ? $value->getPathname() : (string) $value; + + if (!is_file($path)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->notFoundMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setCode(File::NOT_FOUND_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->notFoundMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setCode(File::NOT_FOUND_ERROR) + ->addViolation(); + } + + return; + } + + if (!is_readable($path)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->notReadableMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setCode(File::NOT_READABLE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->notReadableMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setCode(File::NOT_READABLE_ERROR) + ->addViolation(); + } + + return; + } + + $sizeInBytes = filesize($path); + + if (0 === $sizeInBytes) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->disallowEmptyMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setCode(File::EMPTY_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->disallowEmptyMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setCode(File::EMPTY_ERROR) + ->addViolation(); + } + + return; + } + + if ($constraint->maxSize) { + $limitInBytes = $constraint->maxSize; + + if ($sizeInBytes > $limitInBytes) { + list($sizeAsString, $limitAsString, $suffix) = $this->factorizeSizes($sizeInBytes, $limitInBytes, $constraint->binaryFormat); + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->maxSizeMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setParameter('{{ size }}', $sizeAsString) + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setCode(File::TOO_LARGE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->maxSizeMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setParameter('{{ size }}', $sizeAsString) + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setCode(File::TOO_LARGE_ERROR) + ->addViolation(); + } + + return; + } + } + + if ($constraint->mimeTypes) { + if (!$value instanceof FileObject) { + $value = new FileObject($value); + } + + $mimeTypes = (array) $constraint->mimeTypes; + $mime = $value->getMimeType(); + + foreach ($mimeTypes as $mimeType) { + if ($mimeType === $mime) { + return; + } + + if ($discrete = strstr($mimeType, '/*', true)) { + if (strstr($mime, '/', true) === $discrete) { + return; + } + } + } + + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->mimeTypesMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setParameter('{{ type }}', $this->formatValue($mime)) + ->setParameter('{{ types }}', $this->formatValues($mimeTypes)) + ->setCode(File::INVALID_MIME_TYPE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->mimeTypesMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setParameter('{{ type }}', $this->formatValue($mime)) + ->setParameter('{{ types }}', $this->formatValues($mimeTypes)) + ->setCode(File::INVALID_MIME_TYPE_ERROR) + ->addViolation(); + } + } + } + + private static function moreDecimalsThan($double, $numberOfDecimals) + { + return \strlen((string) $double) > \strlen(round($double, $numberOfDecimals)); + } + + /** + * Convert the limit to the smallest possible number + * (i.e. try "MB", then "kB", then "bytes"). + */ + private function factorizeSizes($size, $limit, $binaryFormat) + { + if ($binaryFormat) { + $coef = self::MIB_BYTES; + $coefFactor = self::KIB_BYTES; + } else { + $coef = self::MB_BYTES; + $coefFactor = self::KB_BYTES; + } + + $limitAsString = (string) ($limit / $coef); + + // Restrict the limit to 2 decimals (without rounding! we + // need the precise value) + while (self::moreDecimalsThan($limitAsString, 2)) { + $coef /= $coefFactor; + $limitAsString = (string) ($limit / $coef); + } + + // Convert size to the same measure, but round to 2 decimals + $sizeAsString = (string) round($size / $coef, 2); + + // If the size and limit produce the same string output + // (due to rounding), reduce the coefficient + while ($sizeAsString === $limitAsString) { + $coef /= $coefFactor; + $limitAsString = (string) ($limit / $coef); + $sizeAsString = (string) round($size / $coef, 2); + } + + return array($sizeAsString, $limitAsString, self::$suffices[$coef]); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GreaterThan.php b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThan.php new file mode 100644 index 0000000..c2ca2dc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThan.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class GreaterThan extends AbstractComparison +{ + const TOO_LOW_ERROR = '778b7ae0-84d3-481a-9dec-35fdb64b1d78'; + + protected static $errorNames = array( + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + ); + + public $message = 'This value should be greater than {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php new file mode 100644 index 0000000..9b3743d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class GreaterThanOrEqual extends AbstractComparison +{ + const TOO_LOW_ERROR = 'ea4e51d1-3342-48bd-87f1-9e672cd90cad'; + + protected static $errorNames = array( + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + ); + + public $message = 'This value should be greater than or equal to {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php new file mode 100644 index 0000000..e196e68 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are greater than or equal to the previous (>=). + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class GreaterThanOrEqualValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 >= $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return GreaterThanOrEqual::TOO_LOW_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanValidator.php new file mode 100644 index 0000000..9029e8f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanValidator.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are greater than the previous (>). + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class GreaterThanValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 > $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return GreaterThan::TOO_LOW_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GroupSequence.php b/public/system/storage/vendor/symfony/validator/Constraints/GroupSequence.php new file mode 100644 index 0000000..d2c4d4a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GroupSequence.php @@ -0,0 +1,208 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Exception\OutOfBoundsException; + +/** + * A sequence of validation groups. + * + * When validating a group sequence, each group will only be validated if all + * of the previous groups in the sequence succeeded. For example: + * + * $validator->validate($address, null, new GroupSequence(array('Basic', 'Strict'))); + * + * In the first step, all constraints that belong to the group "Basic" will be + * validated. If none of the constraints fail, the validator will then validate + * the constraints in group "Strict". This is useful, for example, if "Strict" + * contains expensive checks that require a lot of CPU or slow, external + * services. You usually don't want to run expensive checks if any of the cheap + * checks fail. + * + * When adding metadata to a class, you can override the "Default" group of + * that class with a group sequence: + * + * /** + * * @GroupSequence({"Address", "Strict"}) + * *\/ + * class Address + * { + * // ... + * } + * + * Whenever you validate that object in the "Default" group, the group sequence + * will be validated: + * + * $validator->validate($address); + * + * If you want to execute the constraints of the "Default" group for a class + * with an overridden default group, pass the class name as group name instead: + * + * $validator->validate($address, null, "Address") + * + * @Annotation + * @Target({"CLASS", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * Implementing \ArrayAccess, \IteratorAggregate and \Countable is @deprecated since 2.5 and will be removed in 3.0. + */ +class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable +{ + /** + * The groups in the sequence. + * + * @var string[]|GroupSequence[] + */ + public $groups; + + /** + * The group in which cascaded objects are validated when validating + * this sequence. + * + * By default, cascaded objects are validated in each of the groups of + * the sequence. + * + * If a class has a group sequence attached, that sequence replaces the + * "Default" group. When validating that class in the "Default" group, the + * group sequence is used instead, but still the "Default" group should be + * cascaded to other objects. + * + * @var string|GroupSequence + */ + public $cascadedGroup; + + /** + * Creates a new group sequence. + * + * @param string[] $groups The groups in the sequence + */ + public function __construct(array $groups) + { + // Support for Doctrine annotations + $this->groups = isset($groups['value']) ? $groups['value'] : $groups; + } + + /** + * Returns an iterator for this group. + * + * Implemented for backwards compatibility with Symfony < 2.5. + * + * @return \Traversable The iterator + * + * @see \IteratorAggregate::getIterator() + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function getIterator() + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + return new \ArrayIterator($this->groups); + } + + /** + * Returns whether the given offset exists in the sequence. + * + * Implemented for backwards compatibility with Symfony < 2.5. + * + * @param int $offset The offset + * + * @return bool Whether the offset exists + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function offsetExists($offset) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + return isset($this->groups[$offset]); + } + + /** + * Returns the group at the given offset. + * + * Implemented for backwards compatibility with Symfony < 2.5. + * + * @param int $offset The offset + * + * @return string The group a the given offset + * + * @throws OutOfBoundsException If the object does not exist + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function offsetGet($offset) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + if (!isset($this->groups[$offset])) { + throw new OutOfBoundsException(sprintf('The offset "%s" does not exist.', $offset)); + } + + return $this->groups[$offset]; + } + + /** + * Sets the group at the given offset. + * + * Implemented for backwards compatibility with Symfony < 2.5. + * + * @param int $offset The offset + * @param string $value The group name + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function offsetSet($offset, $value) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + if (null !== $offset) { + $this->groups[$offset] = $value; + + return; + } + + $this->groups[] = $value; + } + + /** + * Removes the group at the given offset. + * + * Implemented for backwards compatibility with Symfony < 2.5. + * + * @param int $offset The offset + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function offsetUnset($offset) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + unset($this->groups[$offset]); + } + + /** + * Returns the number of groups in the sequence. + * + * Implemented for backwards compatibility with Symfony < 2.5. + * + * @return int The number of groups + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function count() + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + return \count($this->groups); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GroupSequenceProvider.php b/public/system/storage/vendor/symfony/validator/Constraints/GroupSequenceProvider.php new file mode 100644 index 0000000..8a3fe63 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GroupSequenceProvider.php @@ -0,0 +1,24 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Annotation to define a group sequence provider. + * + * @Annotation + * @Target({"CLASS", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class GroupSequenceProvider +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Iban.php b/public/system/storage/vendor/symfony/validator/Constraints/Iban.php new file mode 100644 index 0000000..9c4d383 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Iban.php @@ -0,0 +1,47 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Manuel Reinhard <manu@sprain.ch> + * @author Michael Schummel + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Iban extends Constraint +{ + /** @deprecated, to be removed in 3.0. */ + const TOO_SHORT_ERROR = '88e5e319-0aeb-4979-a27e-3d9ce0c16166'; + const INVALID_COUNTRY_CODE_ERROR = 'de78ee2c-bd50-44e2-aec8-3d8228aeadb9'; + const INVALID_CHARACTERS_ERROR = '8d3d85e4-784f-4719-a5bc-d9e40d45a3a5'; + /** @deprecated, to be removed in 3.0. */ + const INVALID_CASE_ERROR = 'f4bf62fe-03ec-42af-a53b-68e21b1e7274'; + const CHECKSUM_FAILED_ERROR = 'b9401321-f9bf-4dcb-83c1-f31094440795'; + const INVALID_FORMAT_ERROR = 'c8d318f1-2ecc-41ba-b983-df70d225cf5a'; + const NOT_SUPPORTED_COUNTRY_CODE_ERROR = 'e2c259f3-4b46-48e6-b72e-891658158ec8'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::NOT_SUPPORTED_COUNTRY_CODE_ERROR => 'NOT_SUPPORTED_COUNTRY_CODE_ERROR', + ); + + public $message = 'This is not a valid International Bank Account Number (IBAN).'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IbanValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IbanValidator.php new file mode 100644 index 0000000..d475332 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IbanValidator.php @@ -0,0 +1,293 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Manuel Reinhard <manu@sprain.ch> + * @author Michael Schummel + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see http://www.michael-schummel.de/2007/10/05/iban-prufung-mit-php/ + */ +class IbanValidator extends ConstraintValidator +{ + /** + * IBAN country specific formats. + * + * The first 2 characters from an IBAN format are the two-character ISO country code. + * The following 2 characters represent the check digits calculated from the rest of the IBAN characters. + * The rest are up to thirty alphanumeric characters for + * a BBAN (Basic Bank Account Number) which has a fixed length per country and, + * included within it, a bank identifier with a fixed position and a fixed length per country + * + * @see https://www.swift.com/sites/default/files/resources/iban_registry.pdf + */ + private static $formats = array( + 'AD' => 'AD\d{2}\d{4}\d{4}[\dA-Z]{12}', // Andorra + 'AE' => 'AE\d{2}\d{3}\d{16}', // United Arab Emirates + 'AL' => 'AL\d{2}\d{8}[\dA-Z]{16}', // Albania + 'AO' => 'AO\d{2}\d{21}', // Angola + 'AT' => 'AT\d{2}\d{5}\d{11}', // Austria + 'AX' => 'FI\d{2}\d{6}\d{7}\d{1}', // Aland Islands + 'AZ' => 'AZ\d{2}[A-Z]{4}[\dA-Z]{20}', // Azerbaijan + 'BA' => 'BA\d{2}\d{3}\d{3}\d{8}\d{2}', // Bosnia and Herzegovina + 'BE' => 'BE\d{2}\d{3}\d{7}\d{2}', // Belgium + 'BF' => 'BF\d{2}\d{23}', // Burkina Faso + 'BG' => 'BG\d{2}[A-Z]{4}\d{4}\d{2}[\dA-Z]{8}', // Bulgaria + 'BH' => 'BH\d{2}[A-Z]{4}[\dA-Z]{14}', // Bahrain + 'BI' => 'BI\d{2}\d{12}', // Burundi + 'BJ' => 'BJ\d{2}[A-Z]{1}\d{23}', // Benin + 'BY' => 'BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}', // Belarus - https://bank.codes/iban/structure/belarus/ + 'BL' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Barthelemy + 'BR' => 'BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]', // Brazil + 'CG' => 'CG\d{2}\d{23}', // Congo + 'CH' => 'CH\d{2}\d{5}[\dA-Z]{12}', // Switzerland + 'CI' => 'CI\d{2}[A-Z]{1}\d{23}', // Ivory Coast + 'CM' => 'CM\d{2}\d{23}', // Cameron + 'CR' => 'CR\d{2}0\d{3}\d{14}', // Costa Rica + 'CV' => 'CV\d{2}\d{21}', // Cape Verde + 'CY' => 'CY\d{2}\d{3}\d{5}[\dA-Z]{16}', // Cyprus + 'CZ' => 'CZ\d{2}\d{20}', // Czech Republic + 'DE' => 'DE\d{2}\d{8}\d{10}', // Germany + 'DO' => 'DO\d{2}[\dA-Z]{4}\d{20}', // Dominican Republic + 'DK' => 'DK\d{2}\d{4}\d{10}', // Denmark + 'DZ' => 'DZ\d{2}\d{20}', // Algeria + 'EE' => 'EE\d{2}\d{2}\d{2}\d{11}\d{1}', // Estonia + 'ES' => 'ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}', // Spain (also includes Canary Islands, Ceuta and Melilla) + 'FI' => 'FI\d{2}\d{6}\d{7}\d{1}', // Finland + 'FO' => 'FO\d{2}\d{4}\d{9}\d{1}', // Faroe Islands + 'FR' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // France + 'GF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // French Guyana + 'GB' => 'GB\d{2}[A-Z]{4}\d{6}\d{8}', // United Kingdom of Great Britain and Northern Ireland + 'GE' => 'GE\d{2}[A-Z]{2}\d{16}', // Georgia + 'GI' => 'GI\d{2}[A-Z]{4}[\dA-Z]{15}', // Gibraltar + 'GL' => 'GL\d{2}\d{4}\d{9}\d{1}', // Greenland + 'GP' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Guadeloupe + 'GR' => 'GR\d{2}\d{3}\d{4}[\dA-Z]{16}', // Greece + 'GT' => 'GT\d{2}[\dA-Z]{4}[\dA-Z]{20}', // Guatemala + 'HR' => 'HR\d{2}\d{7}\d{10}', // Croatia + 'HU' => 'HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}', // Hungary + 'IE' => 'IE\d{2}[A-Z]{4}\d{6}\d{8}', // Ireland + 'IL' => 'IL\d{2}\d{3}\d{3}\d{13}', // Israel + 'IR' => 'IR\d{2}\d{22}', // Iran + 'IS' => 'IS\d{2}\d{4}\d{2}\d{6}\d{10}', // Iceland + 'IT' => 'IT\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}', // Italy + 'JO' => 'JO\d{2}[A-Z]{4}\d{4}[\dA-Z]{18}', // Jordan + 'KW' => 'KW\d{2}[A-Z]{4}\d{22}', // KUWAIT + 'KZ' => 'KZ\d{2}\d{3}[\dA-Z]{13}', // Kazakhstan + 'LB' => 'LB\d{2}\d{4}[\dA-Z]{20}', // LEBANON + 'LI' => 'LI\d{2}\d{5}[\dA-Z]{12}', // Liechtenstein (Principality of) + 'LT' => 'LT\d{2}\d{5}\d{11}', // Lithuania + 'LU' => 'LU\d{2}\d{3}[\dA-Z]{13}', // Luxembourg + 'LV' => 'LV\d{2}[A-Z]{4}[\dA-Z]{13}', // Latvia + 'MC' => 'MC\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Monaco + 'MD' => 'MD\d{2}[\dA-Z]{2}[\dA-Z]{18}', // Moldova + 'ME' => 'ME\d{2}\d{3}\d{13}\d{2}', // Montenegro + 'MF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Martin (French part) + 'MG' => 'MG\d{2}\d{23}', // Madagascar + 'MK' => 'MK\d{2}\d{3}[\dA-Z]{10}\d{2}', // Macedonia, Former Yugoslav Republic of + 'ML' => 'ML\d{2}[A-Z]{1}\d{23}', // Mali + 'MQ' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Martinique + 'MR' => 'MR13\d{5}\d{5}\d{11}\d{2}', // Mauritania + 'MT' => 'MT\d{2}[A-Z]{4}\d{5}[\dA-Z]{18}', // Malta + 'MU' => 'MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}', // Mauritius + 'MZ' => 'MZ\d{2}\d{21}', // Mozambique + 'NC' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // New Caledonia + 'NL' => 'NL\d{2}[A-Z]{4}\d{10}', // The Netherlands + 'NO' => 'NO\d{2}\d{4}\d{6}\d{1}', // Norway + 'PF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // French Polynesia + 'PK' => 'PK\d{2}[A-Z]{4}[\dA-Z]{16}', // Pakistan + 'PL' => 'PL\d{2}\d{8}\d{16}', // Poland + 'PM' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Pierre et Miquelon + 'PS' => 'PS\d{2}[A-Z]{4}[\dA-Z]{21}', // Palestine, State of + 'PT' => 'PT\d{2}\d{4}\d{4}\d{11}\d{2}', // Portugal (plus Azores and Madeira) + 'QA' => 'QA\d{2}[A-Z]{4}[\dA-Z]{21}', // Qatar + 'RE' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Reunion + 'RO' => 'RO\d{2}[A-Z]{4}[\dA-Z]{16}', // Romania + 'RS' => 'RS\d{2}\d{3}\d{13}\d{2}', // Serbia + 'SA' => 'SA\d{2}\d{2}[\dA-Z]{18}', // Saudi Arabia + 'SE' => 'SE\d{2}\d{3}\d{16}\d{1}', // Sweden + 'SI' => 'SI\d{2}\d{5}\d{8}\d{2}', // Slovenia + 'SK' => 'SK\d{2}\d{4}\d{6}\d{10}', // Slovak Republic + 'SM' => 'SM\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}', // San Marino + 'SN' => 'SN\d{2}[A-Z]{1}\d{23}', // Senegal + 'TF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // French Southern Territories + 'TL' => 'TL\d{2}\d{3}\d{14}\d{2}', // Timor-Leste + 'TN' => 'TN59\d{2}\d{3}\d{13}\d{2}', // Tunisia + 'TR' => 'TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}', // Turkey + 'UA' => 'UA\d{2}\d{6}[\dA-Z]{19}', // Ukraine + 'VG' => 'VG\d{2}[A-Z]{4}\d{16}', // Virgin Islands, British + 'WF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Wallis and Futuna Islands + 'XK' => 'XK\d{2}\d{4}\d{10}\d{2}', // Republic of Kosovo + 'YT' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Mayotte + ); + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Iban) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Iban'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + // Remove spaces and convert to uppercase + $canonicalized = str_replace(' ', '', strtoupper($value)); + + // The IBAN must contain only digits and characters... + if (!ctype_alnum($canonicalized)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + + // ...start with a two-letter country code + $countryCode = substr($canonicalized, 0, 2); + + if (!ctype_alpha($countryCode)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::INVALID_COUNTRY_CODE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::INVALID_COUNTRY_CODE_ERROR) + ->addViolation(); + } + + return; + } + + // ...have a format available + if (!array_key_exists($countryCode, self::$formats)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR) + ->addViolation(); + } + + return; + } + + // ...and have a valid format + if (!preg_match('/^'.self::$formats[$countryCode].'$/', $canonicalized) + ) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::INVALID_FORMAT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::INVALID_FORMAT_ERROR) + ->addViolation(); + } + + return; + } + + // Move the first four characters to the end + // e.g. CH93 0076 2011 6238 5295 7 + // -> 0076 2011 6238 5295 7 CH93 + $canonicalized = substr($canonicalized, 4).substr($canonicalized, 0, 4); + + // Convert all remaining letters to their ordinals + // The result is an integer, which is too large for PHP's int + // data type, so we store it in a string instead. + // e.g. 0076 2011 6238 5295 7 CH93 + // -> 0076 2011 6238 5295 7 121893 + $checkSum = self::toBigInt($canonicalized); + + // Do a modulo-97 operation on the large integer + // We cannot use PHP's modulo operator, so we calculate the + // modulo step-wisely instead + if (1 !== self::bigModulo97($checkSum)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::CHECKSUM_FAILED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::CHECKSUM_FAILED_ERROR) + ->addViolation(); + } + } + } + + private static function toBigInt($string) + { + $chars = str_split($string); + $bigInt = ''; + + foreach ($chars as $char) { + // Convert uppercase characters to ordinals, starting with 10 for "A" + if (ctype_upper($char)) { + $bigInt .= (\ord($char) - 55); + + continue; + } + + // Simply append digits + $bigInt .= $char; + } + + return $bigInt; + } + + private static function bigModulo97($bigInt) + { + $parts = str_split($bigInt, 7); + $rest = 0; + + foreach ($parts as $part) { + $rest = ($rest.$part) % 97; + } + + return $rest; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IdenticalTo.php b/public/system/storage/vendor/symfony/validator/Constraints/IdenticalTo.php new file mode 100644 index 0000000..a7dadff --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IdenticalTo.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class IdenticalTo extends AbstractComparison +{ + const NOT_IDENTICAL_ERROR = '2a8cc50f-58a2-4536-875e-060a2ce69ed5'; + + protected static $errorNames = array( + self::NOT_IDENTICAL_ERROR => 'NOT_IDENTICAL_ERROR', + ); + + public $message = 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IdenticalToValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IdenticalToValidator.php new file mode 100644 index 0000000..304f71f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IdenticalToValidator.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are identical (===). + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class IdenticalToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 === $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return IdenticalTo::NOT_IDENTICAL_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Image.php b/public/system/storage/vendor/symfony/validator/Constraints/Image.php new file mode 100644 index 0000000..28803c4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Image.php @@ -0,0 +1,77 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Benjamin Dulau <benjamin.dulau@gmail.com> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Image extends File +{ + const SIZE_NOT_DETECTED_ERROR = '6d55c3f4-e58e-4fe3-91ee-74b492199956'; + const TOO_WIDE_ERROR = '7f87163d-878f-47f5-99ba-a8eb723a1ab2'; + const TOO_NARROW_ERROR = '9afbd561-4f90-4a27-be62-1780fc43604a'; + const TOO_HIGH_ERROR = '7efae81c-4877-47ba-aa65-d01ccb0d4645'; + const TOO_LOW_ERROR = 'aef0cb6a-c07f-4894-bc08-1781420d7b4c'; + const RATIO_TOO_BIG_ERROR = '70cafca6-168f-41c9-8c8c-4e47a52be643'; + const RATIO_TOO_SMALL_ERROR = '59b8c6ef-bcf2-4ceb-afff-4642ed92f12e'; + const SQUARE_NOT_ALLOWED_ERROR = '5d41425b-facb-47f7-a55a-de9fbe45cb46'; + const LANDSCAPE_NOT_ALLOWED_ERROR = '6f895685-7cf2-4d65-b3da-9029c5581d88'; + const PORTRAIT_NOT_ALLOWED_ERROR = '65608156-77da-4c79-a88c-02ef6d18c782'; + + // Include the mapping from the base class + + protected static $errorNames = array( + self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', + self::NOT_READABLE_ERROR => 'NOT_READABLE_ERROR', + self::EMPTY_ERROR => 'EMPTY_ERROR', + self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR', + self::INVALID_MIME_TYPE_ERROR => 'INVALID_MIME_TYPE_ERROR', + self::SIZE_NOT_DETECTED_ERROR => 'SIZE_NOT_DETECTED_ERROR', + self::TOO_WIDE_ERROR => 'TOO_WIDE_ERROR', + self::TOO_NARROW_ERROR => 'TOO_NARROW_ERROR', + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + self::RATIO_TOO_BIG_ERROR => 'RATIO_TOO_BIG_ERROR', + self::RATIO_TOO_SMALL_ERROR => 'RATIO_TOO_SMALL_ERROR', + self::SQUARE_NOT_ALLOWED_ERROR => 'SQUARE_NOT_ALLOWED_ERROR', + self::LANDSCAPE_NOT_ALLOWED_ERROR => 'LANDSCAPE_NOT_ALLOWED_ERROR', + self::PORTRAIT_NOT_ALLOWED_ERROR => 'PORTRAIT_NOT_ALLOWED_ERROR', + ); + + public $mimeTypes = 'image/*'; + public $minWidth; + public $maxWidth; + public $maxHeight; + public $minHeight; + public $maxRatio; + public $minRatio; + public $allowSquare = true; + public $allowLandscape = true; + public $allowPortrait = true; + + // The constant for a wrong MIME type is taken from the parent class. + public $mimeTypesMessage = 'This file is not a valid image.'; + public $sizeNotDetectedMessage = 'The size of the image could not be detected.'; + public $maxWidthMessage = 'The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.'; + public $minWidthMessage = 'The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.'; + public $maxHeightMessage = 'The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.'; + public $minHeightMessage = 'The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.'; + public $maxRatioMessage = 'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.'; + public $minRatioMessage = 'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.'; + public $allowSquareMessage = 'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.'; + public $allowLandscapeMessage = 'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.'; + public $allowPortraitMessage = 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/ImageValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/ImageValidator.php new file mode 100644 index 0000000..35ff408 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/ImageValidator.php @@ -0,0 +1,261 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid image file and is valid + * against minWidth, maxWidth, minHeight and maxHeight constraints. + * + * @author Benjamin Dulau <benjamin.dulau@gmail.com> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class ImageValidator extends FileValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Image) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Image'); + } + + $violations = \count($this->context->getViolations()); + + parent::validate($value, $constraint); + + $failed = \count($this->context->getViolations()) !== $violations; + + if ($failed || null === $value || '' === $value) { + return; + } + + if (null === $constraint->minWidth && null === $constraint->maxWidth + && null === $constraint->minHeight && null === $constraint->maxHeight + && null === $constraint->minRatio && null === $constraint->maxRatio + && $constraint->allowSquare && $constraint->allowLandscape && $constraint->allowPortrait) { + return; + } + + $size = @getimagesize($value); + + if (empty($size) || (0 === $size[0]) || (0 === $size[1])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->sizeNotDetectedMessage) + ->setCode(Image::SIZE_NOT_DETECTED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->sizeNotDetectedMessage) + ->setCode(Image::SIZE_NOT_DETECTED_ERROR) + ->addViolation(); + } + + return; + } + + $width = $size[0]; + $height = $size[1]; + + if ($constraint->minWidth) { + if (!ctype_digit((string) $constraint->minWidth)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum width', $constraint->minWidth)); + } + + if ($width < $constraint->minWidth) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->minWidthMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ min_width }}', $constraint->minWidth) + ->setCode(Image::TOO_NARROW_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->minWidthMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ min_width }}', $constraint->minWidth) + ->setCode(Image::TOO_NARROW_ERROR) + ->addViolation(); + } + + return; + } + } + + if ($constraint->maxWidth) { + if (!ctype_digit((string) $constraint->maxWidth)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum width', $constraint->maxWidth)); + } + + if ($width > $constraint->maxWidth) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->maxWidthMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ max_width }}', $constraint->maxWidth) + ->setCode(Image::TOO_WIDE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->maxWidthMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ max_width }}', $constraint->maxWidth) + ->setCode(Image::TOO_WIDE_ERROR) + ->addViolation(); + } + + return; + } + } + + if ($constraint->minHeight) { + if (!ctype_digit((string) $constraint->minHeight)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum height', $constraint->minHeight)); + } + + if ($height < $constraint->minHeight) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->minHeightMessage) + ->setParameter('{{ height }}', $height) + ->setParameter('{{ min_height }}', $constraint->minHeight) + ->setCode(Image::TOO_LOW_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->minHeightMessage) + ->setParameter('{{ height }}', $height) + ->setParameter('{{ min_height }}', $constraint->minHeight) + ->setCode(Image::TOO_LOW_ERROR) + ->addViolation(); + } + + return; + } + } + + if ($constraint->maxHeight) { + if (!ctype_digit((string) $constraint->maxHeight)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum height', $constraint->maxHeight)); + } + + if ($height > $constraint->maxHeight) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->maxHeightMessage) + ->setParameter('{{ height }}', $height) + ->setParameter('{{ max_height }}', $constraint->maxHeight) + ->setCode(Image::TOO_HIGH_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->maxHeightMessage) + ->setParameter('{{ height }}', $height) + ->setParameter('{{ max_height }}', $constraint->maxHeight) + ->setCode(Image::TOO_HIGH_ERROR) + ->addViolation(); + } + } + } + + $ratio = round($width / $height, 2); + + if (null !== $constraint->minRatio) { + if (!is_numeric((string) $constraint->minRatio)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum ratio', $constraint->minRatio)); + } + + if ($ratio < $constraint->minRatio) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->minRatioMessage) + ->setParameter('{{ ratio }}', $ratio) + ->setParameter('{{ min_ratio }}', $constraint->minRatio) + ->setCode(Image::RATIO_TOO_SMALL_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->minRatioMessage) + ->setParameter('{{ ratio }}', $ratio) + ->setParameter('{{ min_ratio }}', $constraint->minRatio) + ->setCode(Image::RATIO_TOO_SMALL_ERROR) + ->addViolation(); + } + } + } + + if (null !== $constraint->maxRatio) { + if (!is_numeric((string) $constraint->maxRatio)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum ratio', $constraint->maxRatio)); + } + + if ($ratio > $constraint->maxRatio) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->maxRatioMessage) + ->setParameter('{{ ratio }}', $ratio) + ->setParameter('{{ max_ratio }}', $constraint->maxRatio) + ->setCode(Image::RATIO_TOO_BIG_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->maxRatioMessage) + ->setParameter('{{ ratio }}', $ratio) + ->setParameter('{{ max_ratio }}', $constraint->maxRatio) + ->setCode(Image::RATIO_TOO_BIG_ERROR) + ->addViolation(); + } + } + } + + if (!$constraint->allowSquare && $width == $height) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->allowSquareMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ height }}', $height) + ->setCode(Image::SQUARE_NOT_ALLOWED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->allowSquareMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ height }}', $height) + ->setCode(Image::SQUARE_NOT_ALLOWED_ERROR) + ->addViolation(); + } + } + + if (!$constraint->allowLandscape && $width > $height) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->allowLandscapeMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ height }}', $height) + ->setCode(Image::LANDSCAPE_NOT_ALLOWED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->allowLandscapeMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ height }}', $height) + ->setCode(Image::LANDSCAPE_NOT_ALLOWED_ERROR) + ->addViolation(); + } + } + + if (!$constraint->allowPortrait && $width < $height) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->allowPortraitMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ height }}', $height) + ->setCode(Image::PORTRAIT_NOT_ALLOWED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->allowPortraitMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ height }}', $height) + ->setCode(Image::PORTRAIT_NOT_ALLOWED_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Ip.php b/public/system/storage/vendor/symfony/validator/Constraints/Ip.php new file mode 100644 index 0000000..f45c4ca --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Ip.php @@ -0,0 +1,86 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * Validates that a value is a valid IP address. + * + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + * @author Joseph Bielawski <stloyd@gmail.com> + */ +class Ip extends Constraint +{ + const V4 = '4'; + const V6 = '6'; + const ALL = 'all'; + + // adds FILTER_FLAG_NO_PRIV_RANGE flag (skip private ranges) + const V4_NO_PRIV = '4_no_priv'; + const V6_NO_PRIV = '6_no_priv'; + const ALL_NO_PRIV = 'all_no_priv'; + + // adds FILTER_FLAG_NO_RES_RANGE flag (skip reserved ranges) + const V4_NO_RES = '4_no_res'; + const V6_NO_RES = '6_no_res'; + const ALL_NO_RES = 'all_no_res'; + + // adds FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE flags (skip both) + const V4_ONLY_PUBLIC = '4_public'; + const V6_ONLY_PUBLIC = '6_public'; + const ALL_ONLY_PUBLIC = 'all_public'; + + const INVALID_IP_ERROR = 'b1b427ae-9f6f-41b0-aa9b-84511fbb3c5b'; + + protected static $versions = array( + self::V4, + self::V6, + self::ALL, + + self::V4_NO_PRIV, + self::V6_NO_PRIV, + self::ALL_NO_PRIV, + + self::V4_NO_RES, + self::V6_NO_RES, + self::ALL_NO_RES, + + self::V4_ONLY_PUBLIC, + self::V6_ONLY_PUBLIC, + self::ALL_ONLY_PUBLIC, + ); + + protected static $errorNames = array( + self::INVALID_IP_ERROR => 'INVALID_IP_ERROR', + ); + + public $version = self::V4; + + public $message = 'This is not a valid IP address.'; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + parent::__construct($options); + + if (!\in_array($this->version, self::$versions)) { + throw new ConstraintDefinitionException(sprintf('The option "version" must be one of "%s"', implode('", "', self::$versions))); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IpValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IpValidator.php new file mode 100644 index 0000000..a27d0e0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IpValidator.php @@ -0,0 +1,110 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid IP address. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * @author Joseph Bielawski <stloyd@gmail.com> + */ +class IpValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Ip) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Ip'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + switch ($constraint->version) { + case Ip::V4: + $flag = FILTER_FLAG_IPV4; + break; + + case Ip::V6: + $flag = FILTER_FLAG_IPV6; + break; + + case Ip::V4_NO_PRIV: + $flag = FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE; + break; + + case Ip::V6_NO_PRIV: + $flag = FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE; + break; + + case Ip::ALL_NO_PRIV: + $flag = FILTER_FLAG_NO_PRIV_RANGE; + break; + + case Ip::V4_NO_RES: + $flag = FILTER_FLAG_IPV4 | FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::V6_NO_RES: + $flag = FILTER_FLAG_IPV6 | FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::ALL_NO_RES: + $flag = FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::V4_ONLY_PUBLIC: + $flag = FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::V6_ONLY_PUBLIC: + $flag = FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::ALL_ONLY_PUBLIC: + $flag = FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE; + break; + + default: + $flag = null; + break; + } + + if (!filter_var($value, FILTER_VALIDATE_IP, $flag)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Ip::INVALID_IP_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Ip::INVALID_IP_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsFalse.php b/public/system/storage/vendor/symfony/validator/Constraints/IsFalse.php new file mode 100644 index 0000000..8332e18 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsFalse.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class IsFalse extends Constraint +{ + const NOT_FALSE_ERROR = 'd53a91b0-def3-426a-83d7-269da7ab4200'; + + protected static $errorNames = array( + self::NOT_FALSE_ERROR => 'NOT_FALSE_ERROR', + ); + + public $message = 'This value should be false.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsFalseValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IsFalseValidator.php new file mode 100644 index 0000000..ff8e17e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsFalseValidator.php @@ -0,0 +1,49 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class IsFalseValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof IsFalse) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\IsFalse'); + } + + if (null === $value || false === $value || 0 === $value || '0' === $value) { + return; + } + + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsFalse::NOT_FALSE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsFalse::NOT_FALSE_ERROR) + ->addViolation(); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsNull.php b/public/system/storage/vendor/symfony/validator/Constraints/IsNull.php new file mode 100644 index 0000000..fdd2930 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsNull.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class IsNull extends Constraint +{ + const NOT_NULL_ERROR = '60d2f30b-8cfa-4372-b155-9656634de120'; + + protected static $errorNames = array( + self::NOT_NULL_ERROR => 'NOT_NULL_ERROR', + ); + + public $message = 'This value should be null.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsNullValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IsNullValidator.php new file mode 100644 index 0000000..6e132c2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsNullValidator.php @@ -0,0 +1,47 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class IsNullValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof IsNull) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\IsNull'); + } + + if (null !== $value) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsNull::NOT_NULL_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsNull::NOT_NULL_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsTrue.php b/public/system/storage/vendor/symfony/validator/Constraints/IsTrue.php new file mode 100644 index 0000000..405a96a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsTrue.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class IsTrue extends Constraint +{ + const NOT_TRUE_ERROR = '2beabf1c-54c0-4882-a928-05249b26e23b'; + + protected static $errorNames = array( + self::NOT_TRUE_ERROR => 'NOT_TRUE_ERROR', + ); + + public $message = 'This value should be true.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsTrueValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IsTrueValidator.php new file mode 100644 index 0000000..5fd5793 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsTrueValidator.php @@ -0,0 +1,51 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class IsTrueValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof IsTrue) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\IsTrue'); + } + + if (null === $value) { + return; + } + + if (true !== $value && 1 !== $value && '1' !== $value) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsTrue::NOT_TRUE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsTrue::NOT_TRUE_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Isbn.php b/public/system/storage/vendor/symfony/validator/Constraints/Isbn.php new file mode 100644 index 0000000..f1e83b9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Isbn.php @@ -0,0 +1,67 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author The Whole Life To Learn <thewholelifetolearn@gmail.com> + * @author Manuel Reinhard <manu@sprain.ch> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Isbn extends Constraint +{ + const TOO_SHORT_ERROR = '949acbb0-8ef5-43ed-a0e9-032dfd08ae45'; + const TOO_LONG_ERROR = '3171387d-f80a-47b3-bd6e-60598545316a'; + const INVALID_CHARACTERS_ERROR = '23d21cea-da99-453d-98b1-a7d916fbb339'; + const CHECKSUM_FAILED_ERROR = '2881c032-660f-46b6-8153-d352d9706640'; + const TYPE_NOT_RECOGNIZED_ERROR = 'fa54a457-f042-441f-89c4-066ee5bdd3e1'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + self::TYPE_NOT_RECOGNIZED_ERROR => 'TYPE_NOT_RECOGNIZED_ERROR', + ); + + public $isbn10Message = 'This value is not a valid ISBN-10.'; + public $isbn13Message = 'This value is not a valid ISBN-13.'; + public $bothIsbnMessage = 'This value is neither a valid ISBN-10 nor a valid ISBN-13.'; + public $type; + public $message; + + /** + * @deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. + * + * @var bool + */ + public $isbn10 = false; + + /** + * @deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. + * + * @var bool + */ + public $isbn13 = false; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'type'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsbnValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IsbnValidator.php new file mode 100644 index 0000000..838f672 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsbnValidator.php @@ -0,0 +1,216 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether the value is a valid ISBN-10 or ISBN-13. + * + * @author The Whole Life To Learn <thewholelifetolearn@gmail.com> + * @author Manuel Reinhard <manu@sprain.ch> + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see https://en.wikipedia.org/wiki/Isbn + */ +class IsbnValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Isbn) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Isbn'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $canonical = str_replace('-', '', $value); + + if (null === $constraint->type) { + if ($constraint->isbn10 && !$constraint->isbn13) { + @trigger_error('The "isbn10" option of the Isbn constraint is deprecated since Symfony 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); + $constraint->type = 'isbn10'; + } elseif ($constraint->isbn13 && !$constraint->isbn10) { + @trigger_error('The "isbn13" option of the Isbn constraint is deprecated since Symfony 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); + $constraint->type = 'isbn13'; + } + } + + // Explicitly validate against ISBN-10 + if ('isbn10' === $constraint->type) { + if (true !== ($code = $this->validateIsbn10($canonical))) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($this->getMessage($constraint, $constraint->type)) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode($code) + ->addViolation(); + } else { + $this->buildViolation($this->getMessage($constraint, $constraint->type)) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode($code) + ->addViolation(); + } + } + + return; + } + + // Explicitly validate against ISBN-13 + if ('isbn13' === $constraint->type) { + if (true !== ($code = $this->validateIsbn13($canonical))) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($this->getMessage($constraint, $constraint->type)) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode($code) + ->addViolation(); + } else { + $this->buildViolation($this->getMessage($constraint, $constraint->type)) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode($code) + ->addViolation(); + } + } + + return; + } + + // Try both ISBNs + + // First, try ISBN-10 + $code = $this->validateIsbn10($canonical); + + // The ISBN can only be an ISBN-13 if the value was too long for ISBN-10 + if (Isbn::TOO_LONG_ERROR === $code) { + // Try ISBN-13 now + $code = $this->validateIsbn13($canonical); + + // If too short, this means we have 11 or 12 digits + if (Isbn::TOO_SHORT_ERROR === $code) { + $code = Isbn::TYPE_NOT_RECOGNIZED_ERROR; + } + } + + if (true !== $code) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($this->getMessage($constraint)) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode($code) + ->addViolation(); + } else { + $this->buildViolation($this->getMessage($constraint)) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode($code) + ->addViolation(); + } + } + } + + protected function validateIsbn10($isbn) + { + // Choose an algorithm so that ERROR_INVALID_CHARACTERS is preferred + // over ERROR_TOO_SHORT/ERROR_TOO_LONG + // Otherwise "0-45122-5244" passes, but "0-45122_5244" reports + // "too long" + + // Error priority: + // 1. ERROR_INVALID_CHARACTERS + // 2. ERROR_TOO_SHORT/ERROR_TOO_LONG + // 3. ERROR_CHECKSUM_FAILED + + $checkSum = 0; + + for ($i = 0; $i < 10; ++$i) { + // If we test the length before the loop, we get an ERROR_TOO_SHORT + // when actually an ERROR_INVALID_CHARACTERS is wanted, e.g. for + // "0-45122_5244" (typo) + if (!isset($isbn[$i])) { + return Isbn::TOO_SHORT_ERROR; + } + + if ('X' === $isbn[$i]) { + $digit = 10; + } elseif (ctype_digit($isbn[$i])) { + $digit = $isbn[$i]; + } else { + return Isbn::INVALID_CHARACTERS_ERROR; + } + + $checkSum += $digit * (10 - $i); + } + + if (isset($isbn[$i])) { + return Isbn::TOO_LONG_ERROR; + } + + return 0 === $checkSum % 11 ? true : Isbn::CHECKSUM_FAILED_ERROR; + } + + protected function validateIsbn13($isbn) + { + // Error priority: + // 1. ERROR_INVALID_CHARACTERS + // 2. ERROR_TOO_SHORT/ERROR_TOO_LONG + // 3. ERROR_CHECKSUM_FAILED + + if (!ctype_digit($isbn)) { + return Isbn::INVALID_CHARACTERS_ERROR; + } + + $length = \strlen($isbn); + + if ($length < 13) { + return Isbn::TOO_SHORT_ERROR; + } + + if ($length > 13) { + return Isbn::TOO_LONG_ERROR; + } + + $checkSum = 0; + + for ($i = 0; $i < 13; $i += 2) { + $checkSum += $isbn[$i]; + } + + for ($i = 1; $i < 12; $i += 2) { + $checkSum += $isbn[$i] + * 3; + } + + return 0 === $checkSum % 10 ? true : Isbn::CHECKSUM_FAILED_ERROR; + } + + protected function getMessage($constraint, $type = null) + { + if (null !== $constraint->message) { + return $constraint->message; + } elseif ('isbn10' === $type) { + return $constraint->isbn10Message; + } elseif ('isbn13' === $type) { + return $constraint->isbn13Message; + } + + return $constraint->bothIsbnMessage; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Issn.php b/public/system/storage/vendor/symfony/validator/Constraints/Issn.php new file mode 100644 index 0000000..a2fecdd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Issn.php @@ -0,0 +1,44 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Antonio J. García Lagar <aj@garcialagar.es> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Issn extends Constraint +{ + const TOO_SHORT_ERROR = '6a20dd3d-f463-4460-8e7b-18a1b98abbfb'; + const TOO_LONG_ERROR = '37cef893-5871-464e-8b12-7fb79324833c'; + const MISSING_HYPHEN_ERROR = '2983286f-8134-4693-957a-1ec4ef887b15'; + const INVALID_CHARACTERS_ERROR = 'a663d266-37c2-4ece-a914-ae891940c588'; + const INVALID_CASE_ERROR = '7b6dd393-7523-4a6c-b84d-72b91bba5e1a'; + const CHECKSUM_FAILED_ERROR = 'b0f92dbc-667c-48de-b526-ad9586d43e85'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::MISSING_HYPHEN_ERROR => 'MISSING_HYPHEN_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + ); + + public $message = 'This value is not a valid ISSN.'; + public $caseSensitive = false; + public $requireHyphen = false; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IssnValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IssnValidator.php new file mode 100644 index 0000000..4413f45 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IssnValidator.php @@ -0,0 +1,183 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether the value is a valid ISSN. + * + * @author Antonio J. García Lagar <aj@garcialagar.es> + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see https://en.wikipedia.org/wiki/Issn + */ +class IssnValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Issn) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Issn'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $canonical = $value; + + // 1234-567X + // ^ + if (isset($canonical[4]) && '-' === $canonical[4]) { + // remove hyphen + $canonical = substr($canonical, 0, 4).substr($canonical, 5); + } elseif ($constraint->requireHyphen) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::MISSING_HYPHEN_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::MISSING_HYPHEN_ERROR) + ->addViolation(); + } + + return; + } + + $length = \strlen($canonical); + + if ($length < 8) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::TOO_SHORT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::TOO_SHORT_ERROR) + ->addViolation(); + } + + return; + } + + if ($length > 8) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::TOO_LONG_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::TOO_LONG_ERROR) + ->addViolation(); + } + + return; + } + + // 1234567X + // ^^^^^^^ digits only + if (!ctype_digit(substr($canonical, 0, 7))) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + + // 1234567X + // ^ digit, x or X + if (!ctype_digit($canonical[7]) && 'x' !== $canonical[7] && 'X' !== $canonical[7]) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + + // 1234567X + // ^ case-sensitive? + if ($constraint->caseSensitive && 'x' === $canonical[7]) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::INVALID_CASE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::INVALID_CASE_ERROR) + ->addViolation(); + } + + return; + } + + // Calculate a checksum. "X" equals 10. + $checkSum = 'X' === $canonical[7] + || 'x' === $canonical[7] + ? 10 + : $canonical[7]; + + for ($i = 0; $i < 7; ++$i) { + // Multiply the first digit by 8, the second by 7, etc. + $checkSum += (8 - $i) * $canonical[$i]; + } + + if (0 !== $checkSum % 11) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::CHECKSUM_FAILED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::CHECKSUM_FAILED_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Language.php b/public/system/storage/vendor/symfony/validator/Constraints/Language.php new file mode 100644 index 0000000..0e676b7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Language.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Language extends Constraint +{ + const NO_SUCH_LANGUAGE_ERROR = 'ee65fec4-9a20-4202-9f39-ca558cd7bdf7'; + + protected static $errorNames = array( + self::NO_SUCH_LANGUAGE_ERROR => 'NO_SUCH_LANGUAGE_ERROR', + ); + + public $message = 'This value is not a valid language.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LanguageValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LanguageValidator.php new file mode 100644 index 0000000..fa06438 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LanguageValidator.php @@ -0,0 +1,61 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid language code. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LanguageValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Language) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Language'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $languages = Intl::getLanguageBundle()->getLanguageNames(); + + if (!isset($languages[$value])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Language::NO_SUCH_LANGUAGE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Language::NO_SUCH_LANGUAGE_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Length.php b/public/system/storage/vendor/symfony/validator/Constraints/Length.php new file mode 100644 index 0000000..20a17fa --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Length.php @@ -0,0 +1,58 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Length extends Constraint +{ + const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45'; + const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9'; + const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + ); + + public $maxMessage = 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.'; + public $minMessage = 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.'; + public $exactMessage = 'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.'; + public $charsetMessage = 'This value does not match the expected {{ charset }} charset.'; + public $max; + public $min; + public $charset = 'UTF-8'; + + public function __construct($options = null) + { + if (null !== $options && !\is_array($options)) { + $options = array( + 'min' => $options, + 'max' => $options, + ); + } + + parent::__construct($options); + + if (null === $this->min && null === $this->max) { + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LengthValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LengthValidator.php new file mode 100644 index 0000000..68e9428 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LengthValidator.php @@ -0,0 +1,109 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LengthValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Length) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Length'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $stringValue = (string) $value; + + if (!$invalidCharset = !@mb_check_encoding($stringValue, $constraint->charset)) { + $length = mb_strlen($stringValue, $constraint->charset); + } + + if ($invalidCharset) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->charsetMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ charset }}', $constraint->charset) + ->setInvalidValue($value) + ->setCode(Length::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->charsetMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ charset }}', $constraint->charset) + ->setInvalidValue($value) + ->setCode(Length::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + + if (null !== $constraint->max && $length > $constraint->max) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->maxMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ limit }}', $constraint->max) + ->setInvalidValue($value) + ->setPlural((int) $constraint->max) + ->setCode(Length::TOO_LONG_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->maxMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ limit }}', $constraint->max) + ->setInvalidValue($value) + ->setPlural((int) $constraint->max) + ->setCode(Length::TOO_LONG_ERROR) + ->addViolation(); + } + + return; + } + + if (null !== $constraint->min && $length < $constraint->min) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->minMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ limit }}', $constraint->min) + ->setInvalidValue($value) + ->setPlural((int) $constraint->min) + ->setCode(Length::TOO_SHORT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->minMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ limit }}', $constraint->min) + ->setInvalidValue($value) + ->setPlural((int) $constraint->min) + ->setCode(Length::TOO_SHORT_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LessThan.php b/public/system/storage/vendor/symfony/validator/Constraints/LessThan.php new file mode 100644 index 0000000..1bbb508 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LessThan.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LessThan extends AbstractComparison +{ + const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; + + protected static $errorNames = array( + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + ); + + public $message = 'This value should be less than {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqual.php b/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqual.php new file mode 100644 index 0000000..d118942 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqual.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LessThanOrEqual extends AbstractComparison +{ + const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; + + protected static $errorNames = array( + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + ); + + public $message = 'This value should be less than or equal to {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php new file mode 100644 index 0000000..54281ee --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are less than or equal to the previous (<=). + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LessThanOrEqualValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 <= $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return LessThanOrEqual::TOO_HIGH_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LessThanValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LessThanValidator.php new file mode 100644 index 0000000..ef7535f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LessThanValidator.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are less than the previous (<). + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LessThanValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 < $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return LessThan::TOO_HIGH_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Locale.php b/public/system/storage/vendor/symfony/validator/Constraints/Locale.php new file mode 100644 index 0000000..5aa7070 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Locale.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Locale extends Constraint +{ + const NO_SUCH_LOCALE_ERROR = 'a0af4293-1f1a-4a1c-a328-979cba6182a2'; + + protected static $errorNames = array( + self::NO_SUCH_LOCALE_ERROR => 'NO_SUCH_LOCALE_ERROR', + ); + + public $message = 'This value is not a valid locale.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LocaleValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LocaleValidator.php new file mode 100644 index 0000000..c9763a5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LocaleValidator.php @@ -0,0 +1,62 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid locale code. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LocaleValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Locale) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Locale'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $locales = Intl::getLocaleBundle()->getLocaleNames(); + $aliases = Intl::getLocaleBundle()->getAliases(); + + if (!isset($locales[$value]) && !\in_array($value, $aliases)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Locale::NO_SUCH_LOCALE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Locale::NO_SUCH_LOCALE_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Luhn.php b/public/system/storage/vendor/symfony/validator/Constraints/Luhn.php new file mode 100644 index 0000000..67f152d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Luhn.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * Metadata for the LuhnValidator. + * + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Tim Nagel <t.nagel@infinite.net.au> + * @author Greg Knapp http://gregk.me/2011/php-implementation-of-bank-card-luhn-algorithm/ + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Luhn extends Constraint +{ + const INVALID_CHARACTERS_ERROR = 'dfad6d23-1b74-4374-929b-5cbb56fc0d9e'; + const CHECKSUM_FAILED_ERROR = '4d760774-3f50-4cd5-a6d5-b10a3299d8d3'; + + protected static $errorNames = array( + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + ); + + public $message = 'Invalid card number.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LuhnValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LuhnValidator.php new file mode 100644 index 0000000..c3fb93d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LuhnValidator.php @@ -0,0 +1,111 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates a PAN using the LUHN Algorithm. + * + * For a list of example card numbers that are used to test this + * class, please see the LuhnValidatorTest class. + * + * @see http://en.wikipedia.org/wiki/Luhn_algorithm + * + * @author Tim Nagel <t.nagel@infinite.net.au> + * @author Greg Knapp http://gregk.me/2011/php-implementation-of-bank-card-luhn-algorithm/ + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LuhnValidator extends ConstraintValidator +{ + /** + * Validates a credit card number with the Luhn algorithm. + * + * @param mixed $value + * @param Constraint $constraint + * + * @throws UnexpectedTypeException when the given credit card number is no string + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Luhn) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Luhn'); + } + + if (null === $value || '' === $value) { + return; + } + + // Work with strings only, because long numbers are represented as floats + // internally and don't work with strlen() + if (!\is_string($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if (!ctype_digit($value)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Luhn::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Luhn::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + + $checkSum = 0; + $length = \strlen($value); + + // Starting with the last digit and walking left, add every second + // digit to the check sum + // e.g. 7 9 9 2 7 3 9 8 7 1 3 + // ^ ^ ^ ^ ^ ^ + // = 7 + 9 + 7 + 9 + 7 + 3 + for ($i = $length - 1; $i >= 0; $i -= 2) { + $checkSum += $value[$i]; + } + + // Starting with the second last digit and walking left, double every + // second digit and add it to the check sum + // For doubles greater than 9, sum the individual digits + // e.g. 7 9 9 2 7 3 9 8 7 1 3 + // ^ ^ ^ ^ ^ + // = 1+8 + 4 + 6 + 1+6 + 2 + for ($i = $length - 2; $i >= 0; $i -= 2) { + $checkSum += array_sum(str_split($value[$i] * 2)); + } + + if (0 === $checkSum || 0 !== $checkSum % 10) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Luhn::CHECKSUM_FAILED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Luhn::CHECKSUM_FAILED_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotBlank.php b/public/system/storage/vendor/symfony/validator/Constraints/NotBlank.php new file mode 100644 index 0000000..e059f10 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotBlank.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class NotBlank extends Constraint +{ + const IS_BLANK_ERROR = 'c1051bb4-d103-4f74-8988-acbcafc7fdc3'; + + protected static $errorNames = array( + self::IS_BLANK_ERROR => 'IS_BLANK_ERROR', + ); + + public $message = 'This value should not be blank.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotBlankValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NotBlankValidator.php new file mode 100644 index 0000000..6655012 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotBlankValidator.php @@ -0,0 +1,47 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class NotBlankValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof NotBlank) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\NotBlank'); + } + + if (false === $value || (empty($value) && '0' != $value)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(NotBlank::IS_BLANK_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(NotBlank::IS_BLANK_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotEqualTo.php b/public/system/storage/vendor/symfony/validator/Constraints/NotEqualTo.php new file mode 100644 index 0000000..8c5abdd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotEqualTo.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class NotEqualTo extends AbstractComparison +{ + const IS_EQUAL_ERROR = 'aa2e33da-25c8-4d76-8c6c-812f02ea89dd'; + + protected static $errorNames = array( + self::IS_EQUAL_ERROR => 'IS_EQUAL_ERROR', + ); + + public $message = 'This value should not be equal to {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotEqualToValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NotEqualToValidator.php new file mode 100644 index 0000000..b80c5ea --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotEqualToValidator.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are all unequal (!=). + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class NotEqualToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 != $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return NotEqualTo::IS_EQUAL_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalTo.php b/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalTo.php new file mode 100644 index 0000000..4c9c63e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalTo.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class NotIdenticalTo extends AbstractComparison +{ + const IS_IDENTICAL_ERROR = '4aaac518-0dda-4129-a6d9-e216b9b454a0'; + + protected static $errorNames = array( + self::IS_IDENTICAL_ERROR => 'IS_IDENTICAL_ERROR', + ); + + public $message = 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php new file mode 100644 index 0000000..3ea8b5a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values aren't identical (!==). + * + * @author Daniel Holmes <daniel@danielholmes.org> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class NotIdenticalToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 !== $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return NotIdenticalTo::IS_IDENTICAL_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotNull.php b/public/system/storage/vendor/symfony/validator/Constraints/NotNull.php new file mode 100644 index 0000000..1cfc1c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotNull.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class NotNull extends Constraint +{ + const IS_NULL_ERROR = 'ad32d13f-c3d4-423b-909a-857b961eb720'; + + protected static $errorNames = array( + self::IS_NULL_ERROR => 'IS_NULL_ERROR', + ); + + public $message = 'This value should not be null.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotNullValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NotNullValidator.php new file mode 100644 index 0000000..0402b3d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotNullValidator.php @@ -0,0 +1,47 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class NotNullValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof NotNull) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\NotNull'); + } + + if (null === $value) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(NotNull::IS_NULL_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(NotNull::IS_NULL_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Null.php b/public/system/storage/vendor/symfony/validator/Constraints/Null.php new file mode 100644 index 0000000..eef0826 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Null.php @@ -0,0 +1,26 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\Null class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsNull class in the same namespace instead.', E_USER_DEPRECATED); + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.7, to be removed in 3.0. Use IsNull instead. + */ +class Null extends IsNull +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NullValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NullValidator.php new file mode 100644 index 0000000..61b6521 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NullValidator.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\NullValidator class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsNullValidator class in the same namespace instead.', E_USER_DEPRECATED); + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.7, to be removed in 3.0. Use IsNullValidator instead. + */ +class NullValidator extends IsNullValidator +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Optional.php b/public/system/storage/vendor/symfony/validator/Constraints/Optional.php new file mode 100644 index 0000000..dab8b43 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Optional.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Optional extends Existence +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Range.php b/public/system/storage/vendor/symfony/validator/Constraints/Range.php new file mode 100644 index 0000000..bf050ac --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Range.php @@ -0,0 +1,67 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Range extends Constraint +{ + const INVALID_CHARACTERS_ERROR = 'ad9a9798-7a99-4df7-8ce9-46e416a1e60b'; + const TOO_HIGH_ERROR = '2d28afcb-e32e-45fb-a815-01c431a86a69'; + const TOO_LOW_ERROR = '76454e69-502c-46c5-9643-f447d837c4d5'; + + /** + * @deprecated Deprecated since version 2.8, to be removed in 3.0. Use + * {@link INVALID_CHARACTERS_ERROR} instead. + */ + const INVALID_VALUE_ERROR = self::INVALID_CHARACTERS_ERROR; + + /** + * @deprecated Deprecated since version 2.8, to be removed in 3.0. Use + * {@link TOO_HIGH_ERROR} instead. + */ + const BEYOND_RANGE_ERROR = self::TOO_HIGH_ERROR; + + /** + * @deprecated Deprecated since version 2.8, to be removed in 3.0. Use + * {@link TOO_LOW_ERROR} instead. + */ + const BELOW_RANGE_ERROR = self::TOO_LOW_ERROR; + + protected static $errorNames = array( + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + ); + + public $minMessage = 'This value should be {{ limit }} or more.'; + public $maxMessage = 'This value should be {{ limit }} or less.'; + public $invalidMessage = 'This value should be a valid number.'; + public $min; + public $max; + + public function __construct($options = null) + { + parent::__construct($options); + + if (null === $this->min && null === $this->max) { + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/RangeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/RangeValidator.php new file mode 100644 index 0000000..924550a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/RangeValidator.php @@ -0,0 +1,104 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class RangeValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Range) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Range'); + } + + if (null === $value) { + return; + } + + if (!is_numeric($value) && !$value instanceof \DateTime && !$value instanceof \DateTimeInterface) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->invalidMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setCode(Range::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->invalidMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setCode(Range::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + + $min = $constraint->min; + $max = $constraint->max; + + // Convert strings to DateTimes if comparing another DateTime + // This allows to compare with any date/time value supported by + // the DateTime constructor: + // http://php.net/manual/en/datetime.formats.php + if ($value instanceof \DateTime || $value instanceof \DateTimeInterface) { + if (\is_string($min)) { + $min = new \DateTime($min); + } + + if (\is_string($max)) { + $max = new \DateTime($max); + } + } + + if (null !== $constraint->max && $value > $max) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->maxMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setParameter('{{ limit }}', $this->formatValue($max, self::PRETTY_DATE)) + ->setCode(Range::TOO_HIGH_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->maxMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setParameter('{{ limit }}', $this->formatValue($max, self::PRETTY_DATE)) + ->setCode(Range::TOO_HIGH_ERROR) + ->addViolation(); + } + + return; + } + + if (null !== $constraint->min && $value < $min) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->minMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setParameter('{{ limit }}', $this->formatValue($min, self::PRETTY_DATE)) + ->setCode(Range::TOO_LOW_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->minMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setParameter('{{ limit }}', $this->formatValue($min, self::PRETTY_DATE)) + ->setCode(Range::TOO_LOW_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Regex.php b/public/system/storage/vendor/symfony/validator/Constraints/Regex.php new file mode 100644 index 0000000..cb12210 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Regex.php @@ -0,0 +1,102 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Regex extends Constraint +{ + const REGEX_FAILED_ERROR = 'de1e3db3-5ed4-4941-aae4-59f3667cc3a3'; + + protected static $errorNames = array( + self::REGEX_FAILED_ERROR => 'REGEX_FAILED_ERROR', + ); + + public $message = 'This value is not valid.'; + public $pattern; + public $htmlPattern; + public $match = true; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'pattern'; + } + + /** + * {@inheritdoc} + */ + public function getRequiredOptions() + { + return array('pattern'); + } + + /** + * Converts the htmlPattern to a suitable format for HTML5 pattern. + * Example: /^[a-z]+$/ would be converted to [a-z]+ + * However, if options are specified, it cannot be converted. + * + * Pattern is also ignored if match=false since the pattern should + * then be reversed before application. + * + * @see http://dev.w3.org/html5/spec/single-page.html#the-pattern-attribute + * + * @return string|null + */ + public function getHtmlPattern() + { + // If htmlPattern is specified, use it + if (null !== $this->htmlPattern) { + return empty($this->htmlPattern) + ? null + : $this->htmlPattern; + } + + // Quit if delimiters not at very beginning/end (e.g. when options are passed) + if ($this->pattern[0] !== $this->pattern[\strlen($this->pattern) - 1]) { + return; + } + + $delimiter = $this->pattern[0]; + + // Unescape the delimiter + $pattern = str_replace('\\'.$delimiter, $delimiter, substr($this->pattern, 1, -1)); + + // If the pattern is inverted, we can simply wrap it in + // ((?!pattern).)* + if (!$this->match) { + return '((?!'.$pattern.').)*'; + } + + // If the pattern contains an or statement, wrap the pattern in + // .*(pattern).* and quit. Otherwise we'd need to parse the pattern + if (false !== strpos($pattern, '|')) { + return '.*('.$pattern.').*'; + } + + // Trim leading ^, otherwise prepend .* + $pattern = '^' === $pattern[0] ? substr($pattern, 1) : '.*'.$pattern; + + // Trim trailing $, otherwise append .* + $pattern = '$' === $pattern[\strlen($pattern) - 1] ? substr($pattern, 0, -1) : $pattern.'.*'; + + return $pattern; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/RegexValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/RegexValidator.php new file mode 100644 index 0000000..07f1c5a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/RegexValidator.php @@ -0,0 +1,60 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value match or not given regexp pattern. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * @author Joseph Bielawski <stloyd@gmail.com> + */ +class RegexValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Regex) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Regex'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if ($constraint->match xor preg_match($constraint->pattern, $value)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Regex::REGEX_FAILED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Regex::REGEX_FAILED_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Required.php b/public/system/storage/vendor/symfony/validator/Constraints/Required.php new file mode 100644 index 0000000..bd77a90 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Required.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Required extends Existence +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Time.php b/public/system/storage/vendor/symfony/validator/Constraints/Time.php new file mode 100644 index 0000000..6bd8dbd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Time.php @@ -0,0 +1,33 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Time extends Constraint +{ + const INVALID_FORMAT_ERROR = '9d27b2bb-f755-4fbf-b725-39b1edbdebdf'; + const INVALID_TIME_ERROR = '8532f9e1-84b2-4d67-8989-0818bc38533b'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', + ); + + public $message = 'This value is not a valid time.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/TimeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/TimeValidator.php new file mode 100644 index 0000000..97f188d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/TimeValidator.php @@ -0,0 +1,91 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class TimeValidator extends ConstraintValidator +{ + const PATTERN = '/^(\d{2}):(\d{2}):(\d{2})$/'; + + /** + * Checks whether a time is valid. + * + * @param int $hour The hour + * @param int $minute The minute + * @param int $second The second + * + * @return bool Whether the time is valid + * + * @internal + */ + public static function checkTime($hour, $minute, $second) + { + return $hour >= 0 && $hour < 24 && $minute >= 0 && $minute < 60 && $second >= 0 && $second < 60; + } + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Time) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Time'); + } + + if (null === $value || '' === $value || $value instanceof \DateTime) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if (!preg_match(static::PATTERN, $value, $matches)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Time::INVALID_FORMAT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Time::INVALID_FORMAT_ERROR) + ->addViolation(); + } + + return; + } + + if (!self::checkTime($matches[1], $matches[2], $matches[3])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Time::INVALID_TIME_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Time::INVALID_TIME_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Traverse.php b/public/system/storage/vendor/symfony/validator/Constraints/Traverse.php new file mode 100644 index 0000000..4572c9b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Traverse.php @@ -0,0 +1,50 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Traverse extends Constraint +{ + public $traverse = true; + + public function __construct($options = null) + { + if (\is_array($options) && array_key_exists('groups', $options)) { + throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint %s', __CLASS__)); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'traverse'; + } + + /** + * {@inheritdoc} + */ + public function getTargets() + { + return self::CLASS_CONSTRAINT; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/True.php b/public/system/storage/vendor/symfony/validator/Constraints/True.php new file mode 100644 index 0000000..9dbf403 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/True.php @@ -0,0 +1,26 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\True class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsTrue class in the same namespace instead.', E_USER_DEPRECATED); + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.7, to be removed in 3.0. Use IsTrue instead. + */ +class True extends IsTrue +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/TrueValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/TrueValidator.php new file mode 100644 index 0000000..c4a886b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/TrueValidator.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\TrueValidator class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsTrueValidator class in the same namespace instead.', E_USER_DEPRECATED); + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.7, to be removed in 3.0. Use IsTrueValidator instead. + */ +class TrueValidator extends IsTrueValidator +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Type.php b/public/system/storage/vendor/symfony/validator/Constraints/Type.php new file mode 100644 index 0000000..e40b478 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Type.php @@ -0,0 +1,48 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Type extends Constraint +{ + const INVALID_TYPE_ERROR = 'ba785a8c-82cb-4283-967c-3cf342181b40'; + + protected static $errorNames = array( + self::INVALID_TYPE_ERROR => 'INVALID_TYPE_ERROR', + ); + + public $message = 'This value should be of type {{ type }}.'; + public $type; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'type'; + } + + /** + * {@inheritdoc} + */ + public function getRequiredOptions() + { + return array('type'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/TypeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/TypeValidator.php new file mode 100644 index 0000000..d69c5d3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/TypeValidator.php @@ -0,0 +1,64 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class TypeValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Type) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Type'); + } + + if (null === $value) { + return; + } + + $type = strtolower($constraint->type); + $type = 'boolean' == $type ? 'bool' : $constraint->type; + $isFunction = 'is_'.$type; + $ctypeFunction = 'ctype_'.$type; + + if (\function_exists($isFunction) && $isFunction($value)) { + return; + } elseif (\function_exists($ctypeFunction) && $ctypeFunction($value)) { + return; + } elseif ($value instanceof $constraint->type) { + return; + } + + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setParameter('{{ type }}', $constraint->type) + ->setCode(Type::INVALID_TYPE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setParameter('{{ type }}', $constraint->type) + ->setCode(Type::INVALID_TYPE_ERROR) + ->addViolation(); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Url.php b/public/system/storage/vendor/symfony/validator/Constraints/Url.php new file mode 100644 index 0000000..8453a90 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Url.php @@ -0,0 +1,34 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Url extends Constraint +{ + const INVALID_URL_ERROR = '57c2f299-1154-4870-89bb-ef3b1f5ad229'; + + protected static $errorNames = array( + self::INVALID_URL_ERROR => 'INVALID_URL_ERROR', + ); + + public $message = 'This value is not a valid URL.'; + public $dnsMessage = 'The host could not be resolved.'; + public $protocols = array('http', 'https'); + public $checkDNS = false; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/UrlValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/UrlValidator.php new file mode 100644 index 0000000..4527ab2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/UrlValidator.php @@ -0,0 +1,100 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class UrlValidator extends ConstraintValidator +{ + const PATTERN = '~^ + (%s):// # protocol + (([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth + ( + ([\pL\pN\pS\-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name + | # or + \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address + | # or + \[ + (?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::)))) + \] # an IPv6 address + ) + (:[0-9]+)? # a port (optional) + (?:/ (?:[\pL\pN\-._\~!$&\'()*+,;=:@]|%%[0-9A-Fa-f]{2})* )* # a path + (?:\? (?:[\pL\pN\-._\~!$&\'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a query (optional) + (?:\# (?:[\pL\pN\-._\~!$&\'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a fragment (optional) + $~ixu'; + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Url) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Url'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + if ('' === $value) { + return; + } + + $pattern = sprintf(static::PATTERN, implode('|', $constraint->protocols)); + + if (!preg_match($pattern, $value)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + } + + return; + } + + if ($constraint->checkDNS) { + $host = parse_url($value, PHP_URL_HOST); + + if (!\is_string($host) || !checkdnsrr($host, 'ANY')) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->dnsMessage) + ->setParameter('{{ value }}', $this->formatValue($host)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->dnsMessage) + ->setParameter('{{ value }}', $this->formatValue($host)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Uuid.php b/public/system/storage/vendor/symfony/validator/Constraints/Uuid.php new file mode 100644 index 0000000..2deecba --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Uuid.php @@ -0,0 +1,77 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * + * @author Colin O'Dell <colinodell@gmail.com> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Uuid extends Constraint +{ + const TOO_SHORT_ERROR = 'aa314679-dac9-4f54-bf97-b2049df8f2a3'; + const TOO_LONG_ERROR = '494897dd-36f8-4d31-8923-71a8d5f3000d'; + const INVALID_CHARACTERS_ERROR = '51120b12-a2bc-41bf-aa53-cd73daf330d0'; + const INVALID_HYPHEN_PLACEMENT_ERROR = '98469c83-0309-4f5d-bf95-a496dcaa869c'; + const INVALID_VERSION_ERROR = '21ba13b4-b185-4882-ac6f-d147355987eb'; + const INVALID_VARIANT_ERROR = '164ef693-2b9d-46de-ad7f-836201f0c2db'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_HYPHEN_PLACEMENT_ERROR => 'INVALID_HYPHEN_PLACEMENT_ERROR', + self::INVALID_VERSION_ERROR => 'INVALID_VERSION_ERROR', + self::INVALID_VARIANT_ERROR => 'INVALID_VARIANT_ERROR', + ); + + // Possible versions defined by RFC 4122 + const V1_MAC = 1; + const V2_DCE = 2; + const V3_MD5 = 3; + const V4_RANDOM = 4; + const V5_SHA1 = 5; + + /** + * Message to display when validation fails. + * + * @var string + */ + public $message = 'This is not a valid UUID.'; + + /** + * Strict mode only allows UUIDs that meet the formal definition and formatting per RFC 4122. + * + * Set this to `false` to allow legacy formats with different dash positioning or wrapping characters + * + * @var bool + */ + public $strict = true; + + /** + * Array of allowed versions (see version constants above). + * + * All UUID versions are allowed by default + * + * @var int[] + */ + public $versions = array( + self::V1_MAC, + self::V2_DCE, + self::V3_MD5, + self::V4_RANDOM, + self::V5_SHA1, + ); +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/UuidValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/UuidValidator.php new file mode 100644 index 0000000..8e2e5da --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/UuidValidator.php @@ -0,0 +1,350 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Deprecated\UuidValidator as Deprecated; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether the value is a valid UUID (also known as GUID). + * + * Strict validation will allow a UUID as specified per RFC 4122. + * Loose validation will allow any type of UUID. + * + * For better compatibility, both loose and strict, you should consider using a specialized UUID library like "ramsey/uuid" instead. + * + * @author Colin O'Dell <colinodell@gmail.com> + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see http://tools.ietf.org/html/rfc4122 + * @see https://en.wikipedia.org/wiki/Universally_unique_identifier + * @see https://github.com/ramsey/uuid + */ +class UuidValidator extends ConstraintValidator +{ + // The strict pattern matches UUIDs like this: + // xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx + + // Roughly speaking: + // x = any hexadecimal character + // M = any allowed version {1..5} + // N = any allowed variant {8, 9, a, b} + + const STRICT_LENGTH = 36; + const STRICT_FIRST_HYPHEN_POSITION = 8; + const STRICT_LAST_HYPHEN_POSITION = 23; + const STRICT_VERSION_POSITION = 14; + const STRICT_VARIANT_POSITION = 19; + + // The loose pattern validates similar yet non-compliant UUIDs. + // Hyphens are completely optional. If present, they should only appear + // between every fourth character: + // xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx + // xxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxx + // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + + // The value can also be wrapped with characters like []{}: + // {xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx} + + // Neither the version nor the variant is validated by this pattern. + + const LOOSE_MAX_LENGTH = 39; + const LOOSE_FIRST_HYPHEN_POSITION = 4; + + /** + * @deprecated since version 2.6, to be removed in 3.0 + */ + const STRICT_PATTERN = '/^[a-f0-9]{8}-[a-f0-9]{4}-[%s][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i'; + + /** + * @deprecated since version 2.6, to be removed in 3.0 + */ + const LOOSE_PATTERN = '/^[a-f0-9]{4}(?:-?[a-f0-9]{4}){7}$/i'; + + /** + * @deprecated since version 2.6, to be removed in 3.0 + */ + const STRICT_UUID_LENGTH = 36; + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Uuid) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Uuid'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if ($constraint->strict) { + $this->validateStrict($value, $constraint); + + return; + } + + $this->validateLoose($value, $constraint); + } + + private function validateLoose($value, Uuid $constraint) + { + // Error priority: + // 1. ERROR_INVALID_CHARACTERS + // 2. ERROR_INVALID_HYPHEN_PLACEMENT + // 3. ERROR_TOO_SHORT/ERROR_TOO_LONG + + // Trim any wrapping characters like [] or {} used by some legacy systems + $trimmed = trim($value, '[]{}'); + + // Position of the next expected hyphen + $h = self::LOOSE_FIRST_HYPHEN_POSITION; + + // Expected length + $l = self::LOOSE_MAX_LENGTH; + + for ($i = 0; $i < $l; ++$i) { + // Check length + if (!isset($trimmed[$i])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_SHORT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_SHORT_ERROR) + ->addViolation(); + } + + return; + } + + // Hyphens must occur every fifth position + // xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx + // ^ ^ ^ ^ ^ ^ ^ + if ('-' === $trimmed[$i]) { + if ($i !== $h) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); + } + + return; + } + + $h += 5; + + continue; + } + + // Missing hyphens are ignored + if ($i === $h) { + $h += 4; + --$l; + } + + // Check characters + if (!ctype_xdigit($trimmed[$i])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + } + + // Check length again + if (isset($trimmed[$i])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_LONG_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_LONG_ERROR) + ->addViolation(); + } + } + } + + private function validateStrict($value, Uuid $constraint) + { + // Error priority: + // 1. ERROR_INVALID_CHARACTERS + // 2. ERROR_INVALID_HYPHEN_PLACEMENT + // 3. ERROR_TOO_SHORT/ERROR_TOO_LONG + // 4. ERROR_INVALID_VERSION + // 5. ERROR_INVALID_VARIANT + + // Position of the next expected hyphen + $h = self::STRICT_FIRST_HYPHEN_POSITION; + + for ($i = 0; $i < self::STRICT_LENGTH; ++$i) { + // Check length + if (!isset($value[$i])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_SHORT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_SHORT_ERROR) + ->addViolation(); + } + + return; + } + + // Check hyphen placement + // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + // ^ ^ ^ ^ + if ('-' === $value[$i]) { + if ($i !== $h) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); + } + + return; + } + + // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + // ^ + if ($h < self::STRICT_LAST_HYPHEN_POSITION) { + $h += 5; + } + + continue; + } + + // Check characters + if (!ctype_xdigit($value[$i])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + + // Missing hyphen + if ($i === $h) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); + } + + return; + } + } + + // Check length again + if (isset($value[$i])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_LONG_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_LONG_ERROR) + ->addViolation(); + } + } + + // Check version + if (!\in_array($value[self::STRICT_VERSION_POSITION], $constraint->versions)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_VERSION_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_VERSION_ERROR) + ->addViolation(); + } + } + + // Check variant - first two bits must equal "10" + // 0b10xx + // & 0b1100 (12) + // = 0b1000 (8) + if (8 !== (hexdec($value[self::STRICT_VARIANT_POSITION]) & 12)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_VARIANT_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_VARIANT_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Valid.php b/public/system/storage/vendor/symfony/validator/Constraints/Valid.php new file mode 100644 index 0000000..35a8edc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Valid.php @@ -0,0 +1,44 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class Valid extends Constraint +{ + public $traverse = true; + + /** + * @deprecated since version 2.5, to be removed in Symfony 3.0. + */ + public $deep = true; + + public function __construct($options = null) + { + if (\is_array($options) && array_key_exists('groups', $options)) { + throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint %s', __CLASS__)); + } + + if (\is_array($options) && array_key_exists('deep', $options)) { + @trigger_error('The "deep" option for the Valid constraint is deprecated since Symfony 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED); + } + + parent::__construct($options); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Context/ExecutionContext.php b/public/system/storage/vendor/symfony/validator/Context/ExecutionContext.php new file mode 100644 index 0000000..165c572 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/ExecutionContext.php @@ -0,0 +1,467 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\ClassBasedInterface; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; +use Symfony\Component\Validator\Mapping\MetadataInterface; +use Symfony\Component\Validator\Mapping\PropertyMetadataInterface; +use Symfony\Component\Validator\Util\PropertyPath; +use Symfony\Component\Validator\Validator\ValidatorInterface; +use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; +use Symfony\Component\Validator\Violation\ConstraintViolationBuilder; + +/** + * The context used and created by {@link ExecutionContextFactory}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see ExecutionContextInterface + * + * @internal You should not instantiate or use this class. Code against + * {@link ExecutionContextInterface} instead. + */ +class ExecutionContext implements ExecutionContextInterface +{ + /** + * @var ValidatorInterface + */ + private $validator; + + /** + * The root value of the validated object graph. + * + * @var mixed + */ + private $root; + + /** + * @var TranslatorInterface + */ + private $translator; + + /** + * @var string + */ + private $translationDomain; + + /** + * The violations generated in the current context. + * + * @var ConstraintViolationList + */ + private $violations; + + /** + * The currently validated value. + * + * @var mixed + */ + private $value; + + /** + * The currently validated object. + * + * @var object|null + */ + private $object; + + /** + * The property path leading to the current value. + * + * @var string + */ + private $propertyPath = ''; + + /** + * The current validation metadata. + * + * @var MetadataInterface|null + */ + private $metadata; + + /** + * The currently validated group. + * + * @var string|null + */ + private $group; + + /** + * The currently validated constraint. + * + * @var Constraint|null + */ + private $constraint; + + /** + * Stores which objects have been validated in which group. + * + * @var array + */ + private $validatedObjects = array(); + + /** + * Stores which class constraint has been validated for which object. + * + * @var array + */ + private $validatedConstraints = array(); + + /** + * Stores which objects have been initialized. + * + * @var array + */ + private $initializedObjects; + + /** + * Creates a new execution context. + * + * @param ValidatorInterface $validator The validator + * @param mixed $root The root value of the + * validated object graph + * @param TranslatorInterface $translator The translator + * @param string|null $translationDomain The translation domain to + * use for translating + * violation messages + * + * @internal Called by {@link ExecutionContextFactory}. Should not be used + * in user code. + */ + public function __construct(ValidatorInterface $validator, $root, TranslatorInterface $translator, $translationDomain = null) + { + $this->validator = $validator; + $this->root = $root; + $this->translator = $translator; + $this->translationDomain = $translationDomain; + $this->violations = new ConstraintViolationList(); + } + + /** + * {@inheritdoc} + */ + public function setNode($value, $object, MetadataInterface $metadata = null, $propertyPath) + { + $this->value = $value; + $this->object = $object; + $this->metadata = $metadata; + $this->propertyPath = (string) $propertyPath; + } + + /** + * {@inheritdoc} + */ + public function setGroup($group) + { + $this->group = $group; + } + + /** + * {@inheritdoc} + */ + public function setConstraint(Constraint $constraint) + { + $this->constraint = $constraint; + } + + /** + * {@inheritdoc} + */ + public function addViolation($message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) + { + // The parameters $invalidValue and following are ignored by the new + // API, as they are not present in the new interface anymore. + // You should use buildViolation() instead. + if (\func_num_args() > 2) { + @trigger_error('The parameters $invalidValue, $plural and $code in method '.__METHOD__.' are deprecated since Symfony 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); + + $this + ->buildViolation($message, $parameters) + ->setInvalidValue($invalidValue) + ->setPlural($plural) + ->setCode($code) + ->addViolation() + ; + + return; + } + + $this->violations->add(new ConstraintViolation( + $this->translator->trans($message, $parameters, $this->translationDomain), + $message, + $parameters, + $this->root, + $this->propertyPath, + $this->value, + null, + null, + $this->constraint + )); + } + + /** + * {@inheritdoc} + */ + public function buildViolation($message, array $parameters = array()) + { + return new ConstraintViolationBuilder( + $this->violations, + $this->constraint, + $message, + $parameters, + $this->root, + $this->propertyPath, + $this->value, + $this->translator, + $this->translationDomain + ); + } + + /** + * {@inheritdoc} + */ + public function getViolations() + { + return $this->violations; + } + + /** + * {@inheritdoc} + */ + public function getValidator() + { + return $this->validator; + } + + /** + * {@inheritdoc} + */ + public function getRoot() + { + return $this->root; + } + + /** + * {@inheritdoc} + */ + public function getValue() + { + return $this->value; + } + + /** + * {@inheritdoc} + */ + public function getObject() + { + return $this->object; + } + + /** + * {@inheritdoc} + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * {@inheritdoc} + */ + public function getGroup() + { + return $this->group; + } + + public function getConstraint() + { + return $this->constraint; + } + + /** + * {@inheritdoc} + */ + public function getClassName() + { + return $this->metadata instanceof ClassBasedInterface ? $this->metadata->getClassName() : null; + } + + /** + * {@inheritdoc} + */ + public function getPropertyName() + { + return $this->metadata instanceof PropertyMetadataInterface ? $this->metadata->getPropertyName() : null; + } + + /** + * {@inheritdoc} + */ + public function getPropertyPath($subPath = '') + { + return PropertyPath::append($this->propertyPath, $subPath); + } + + /** + * {@inheritdoc} + */ + public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); + + if (\func_num_args() > 2) { + $this + ->buildViolation($message, $parameters) + ->atPath($subPath) + ->setInvalidValue($invalidValue) + ->setPlural($plural) + ->setCode($code) + ->addViolation() + ; + + return; + } + + $this + ->buildViolation($message, $parameters) + ->atPath($subPath) + ->addViolation() + ; + } + + /** + * {@inheritdoc} + */ + public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED); + + if (\is_array($value)) { + // The $traverse flag is ignored for arrays + $constraint = new Valid(array('traverse' => true, 'deep' => $deep)); + + return $this + ->getValidator() + ->inContext($this) + ->atPath($subPath) + ->validate($value, $constraint, $groups) + ; + } + + if ($traverse && $value instanceof \Traversable) { + $constraint = new Valid(array('traverse' => true, 'deep' => $deep)); + + return $this + ->getValidator() + ->inContext($this) + ->atPath($subPath) + ->validate($value, $constraint, $groups) + ; + } + + return $this + ->getValidator() + ->inContext($this) + ->atPath($subPath) + ->validate($value, null, $groups) + ; + } + + /** + * {@inheritdoc} + */ + public function validateValue($value, $constraints, $subPath = '', $groups = null) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED); + + return $this + ->getValidator() + ->inContext($this) + ->atPath($subPath) + ->validate($value, $constraints, $groups) + ; + } + + /** + * {@inheritdoc} + */ + public function getMetadataFactory() + { + @trigger_error('The '.__METHOD__.' is deprecated since Symfony 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext::getValidator method in combination with Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); + + $validator = $this->getValidator(); + + if ($validator instanceof LegacyValidatorInterface) { + return $validator->getMetadataFactory(); + } + + // The ValidatorInterface extends from the deprecated MetadataFactoryInterface, so return it when we don't have the factory instance itself + return $validator; + } + + /** + * {@inheritdoc} + */ + public function markGroupAsValidated($cacheKey, $groupHash) + { + if (!isset($this->validatedObjects[$cacheKey])) { + $this->validatedObjects[$cacheKey] = array(); + } + + $this->validatedObjects[$cacheKey][$groupHash] = true; + } + + /** + * {@inheritdoc} + */ + public function isGroupValidated($cacheKey, $groupHash) + { + return isset($this->validatedObjects[$cacheKey][$groupHash]); + } + + /** + * {@inheritdoc} + */ + public function markConstraintAsValidated($cacheKey, $constraintHash) + { + $this->validatedConstraints[$cacheKey.':'.$constraintHash] = true; + } + + /** + * {@inheritdoc} + */ + public function isConstraintValidated($cacheKey, $constraintHash) + { + return isset($this->validatedConstraints[$cacheKey.':'.$constraintHash]); + } + + /** + * {@inheritdoc} + */ + public function markObjectAsInitialized($cacheKey) + { + $this->initializedObjects[$cacheKey] = true; + } + + /** + * {@inheritdoc} + */ + public function isObjectInitialized($cacheKey) + { + return isset($this->initializedObjects[$cacheKey]); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactory.php b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactory.php new file mode 100644 index 0000000..cbd9935 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactory.php @@ -0,0 +1,56 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * Creates new {@link ExecutionContext} instances. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @internal You should not instantiate or use this class. Code against + * {@link ExecutionContextFactoryInterface} instead. + */ +class ExecutionContextFactory implements ExecutionContextFactoryInterface +{ + private $translator; + private $translationDomain; + + /** + * Creates a new context factory. + * + * @param TranslatorInterface $translator The translator + * @param string|null $translationDomain The translation domain to + * use for translating + * violation messages + */ + public function __construct(TranslatorInterface $translator, $translationDomain = null) + { + $this->translator = $translator; + $this->translationDomain = $translationDomain; + } + + /** + * {@inheritdoc} + */ + public function createContext(ValidatorInterface $validator, $root) + { + return new ExecutionContext( + $validator, + $root, + $this->translator, + $this->translationDomain + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php new file mode 100644 index 0000000..f3ab3dd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php @@ -0,0 +1,36 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * Creates instances of {@link ExecutionContextInterface}. + * + * You can use a custom factory if you want to customize the execution context + * that is passed through the validation run. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ExecutionContextFactoryInterface +{ + /** + * Creates a new execution context. + * + * @param ValidatorInterface $validator The validator + * @param mixed $root The root value of the validated + * object graph + * + * @return ExecutionContextInterface The new execution context + */ + public function createContext(ValidatorInterface $validator, $root); +} diff --git a/public/system/storage/vendor/symfony/validator/Context/ExecutionContextInterface.php b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextInterface.php new file mode 100644 index 0000000..548a4db --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextInterface.php @@ -0,0 +1,225 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ExecutionContextInterface as LegacyExecutionContextInterface; +use Symfony\Component\Validator\Mapping\MetadataInterface; +use Symfony\Component\Validator\Validator\ValidatorInterface; +use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; + +/** + * The context of a validation run. + * + * The context collects all violations generated during the validation. By + * default, validators execute all validations in a new context: + * + * $violations = $validator->validate($object); + * + * When you make another call to the validator, while the validation is in + * progress, the violations will be isolated from each other: + * + * public function validate($value, Constraint $constraint) + * { + * $validator = $this->context->getValidator(); + * + * // The violations are not added to $this->context + * $violations = $validator->validate($value); + * } + * + * However, if you want to add the violations to the current context, use the + * {@link ValidatorInterface::inContext()} method: + * + * public function validate($value, Constraint $constraint) + * { + * $validator = $this->context->getValidator(); + * + * // The violations are added to $this->context + * $validator + * ->inContext($this->context) + * ->validate($value) + * ; + * } + * + * Additionally, the context provides information about the current state of + * the validator, such as the currently validated class, the name of the + * currently validated property and more. These values change over time, so you + * cannot store a context and expect that the methods still return the same + * results later on. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ExecutionContextInterface extends LegacyExecutionContextInterface +{ + /** + * Returns a builder for adding a violation with extended information. + * + * Call {@link ConstraintViolationBuilderInterface::addViolation()} to + * add the violation when you're done with the configuration: + * + * $context->buildViolation('Please enter a number between %min% and %max%.') + * ->setParameter('%min%', 3) + * ->setParameter('%max%', 10) + * ->setTranslationDomain('number_validation') + * ->addViolation(); + * + * @param string $message The error message + * @param array $parameters The parameters substituted in the error message + * + * @return ConstraintViolationBuilderInterface The violation builder + */ + public function buildViolation($message, array $parameters = array()); + + /** + * Returns the validator. + * + * Useful if you want to validate additional constraints: + * + * public function validate($value, Constraint $constraint) + * { + * $validator = $this->context->getValidator(); + * + * $violations = $validator->validate($value, new Length(array('min' => 3))); + * + * if (count($violations) > 0) { + * // ... + * } + * } + * + * @return ValidatorInterface + */ + public function getValidator(); + + /** + * Returns the currently validated object. + * + * If the validator is currently validating a class constraint, the + * object of that class is returned. If it is a validating a property or + * getter constraint, the object that the property/getter belongs to is + * returned. + * + * In other cases, null is returned. + * + * @return object|null The currently validated object or null + */ + public function getObject(); + + /** + * Sets the currently validated value. + * + * @param mixed $value The validated value + * @param object|null $object The currently validated object + * @param MetadataInterface|null $metadata The validation metadata + * @param string $propertyPath The property path to the current value + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function setNode($value, $object, MetadataInterface $metadata = null, $propertyPath); + + /** + * Sets the currently validated group. + * + * @param string|null $group The validated group + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function setGroup($group); + + /** + * Sets the currently validated constraint. + * + * @param Constraint $constraint The validated constraint + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function setConstraint(Constraint $constraint); + + /** + * Marks an object as validated in a specific validation group. + * + * @param string $cacheKey The hash of the object + * @param string $groupHash The group's name or hash, if it is group + * sequence + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function markGroupAsValidated($cacheKey, $groupHash); + + /** + * Returns whether an object was validated in a specific validation group. + * + * @param string $cacheKey The hash of the object + * @param string $groupHash The group's name or hash, if it is group + * sequence + * + * @return bool Whether the object was already validated for that + * group + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function isGroupValidated($cacheKey, $groupHash); + + /** + * Marks a constraint as validated for an object. + * + * @param string $cacheKey The hash of the object + * @param string $constraintHash The hash of the constraint + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function markConstraintAsValidated($cacheKey, $constraintHash); + + /** + * Returns whether a constraint was validated for an object. + * + * @param string $cacheKey The hash of the object + * @param string $constraintHash The hash of the constraint + * + * @return bool Whether the constraint was already validated + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function isConstraintValidated($cacheKey, $constraintHash); + + /** + * Marks that an object was initialized. + * + * @param string $cacheKey The hash of the object + * + * @internal Used by the validator engine. Should not be called by user + * code. + * + * @see ObjectInitializerInterface + */ + public function markObjectAsInitialized($cacheKey); + + /** + * Returns whether an object was initialized. + * + * @param string $cacheKey The hash of the object + * + * @return bool Whether the object was already initialized + * + * @internal Used by the validator engine. Should not be called by user + * code. + * + * @see ObjectInitializerInterface + */ + public function isObjectInitialized($cacheKey); +} diff --git a/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContext.php b/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContext.php new file mode 100644 index 0000000..8c49c70 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContext.php @@ -0,0 +1,46 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * An execution context that is compatible with the legacy API (< 2.5). + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + */ +class LegacyExecutionContext extends ExecutionContext +{ + /** + * Creates a new context. + * + * @see ExecutionContext::__construct() + * + * @internal Called by {@link LegacyExecutionContextFactory}. Should not be used + * in user code. + */ + public function __construct(ValidatorInterface $validator, $root, MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null) + { + parent::__construct( + $validator, + $root, + $translator, + $translationDomain + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php b/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php new file mode 100644 index 0000000..3cd4f79 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php @@ -0,0 +1,64 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * Creates new {@link LegacyExecutionContext} instances. + * + * Implemented for backward compatibility with Symfony < 2.5. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + */ +class LegacyExecutionContextFactory implements ExecutionContextFactoryInterface +{ + private $metadataFactory; + private $translator; + private $translationDomain; + + /** + * Creates a new context factory. + * + * @param MetadataFactoryInterface $metadataFactory The metadata factory + * @param TranslatorInterface $translator The translator + * @param string|null $translationDomain The translation domain + * to use for translating + * violation messages + */ + public function __construct(MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null) + { + $this->metadataFactory = $metadataFactory; + $this->translator = $translator; + $this->translationDomain = $translationDomain; + } + + /** + * {@inheritdoc} + */ + public function createContext(ValidatorInterface $validator, $root) + { + return new LegacyExecutionContext( + $validator, + $root, + $this->metadataFactory, + $this->translator, + $this->translationDomain + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/DefaultTranslator.php b/public/system/storage/vendor/symfony/validator/DefaultTranslator.php new file mode 100644 index 0000000..cd9b5d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/DefaultTranslator.php @@ -0,0 +1,171 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +@trigger_error('The class '.__NAMESPACE__.'\DefaultTranslator is deprecated since Symfony 2.7 and will be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead.', E_USER_DEPRECATED); + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Exception\BadMethodCallException; +use Symfony\Component\Validator\Exception\InvalidArgumentException; + +/** + * Simple translator implementation that simply replaces the parameters in + * the message IDs. + * + * Example usage: + * + * $translator = new DefaultTranslator(); + * + * echo $translator->trans( + * 'This is a {{ var }}.', + * array('{{ var }}' => 'donkey') + * ); + * + * // -> This is a donkey. + * + * echo $translator->transChoice( + * 'This is {{ count }} donkey.|These are {{ count }} donkeys.', + * 3, + * array('{{ count }}' => 'three') + * ); + * + * // -> These are three donkeys. + * + * This translator does not support message catalogs, translation domains or + * locales. Instead, it implements a subset of the capabilities of + * {@link \Symfony\Component\Translation\Translator} and can be used in places + * where translation is not required by default but should be optional. + * + * @deprecated since version 2.7, to be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class DefaultTranslator implements TranslatorInterface +{ + /** + * Interpolates the given message. + * + * Parameters are replaced in the message in the same manner that + * {@link strtr()} uses. + * + * Example usage: + * + * $translator = new DefaultTranslator(); + * + * echo $translator->trans( + * 'This is a {{ var }}.', + * array('{{ var }}' => 'donkey') + * ); + * + * // -> This is a donkey. + * + * @param string $id The message id + * @param array $parameters An array of parameters for the message + * @param string $domain Ignored + * @param string $locale Ignored + * + * @return string The interpolated string + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + return strtr($id, $parameters); + } + + /** + * Interpolates the given choice message by choosing a variant according to a number. + * + * The variants are passed in the message ID using the format + * "<singular>|<plural>". "<singular>" is chosen if the passed $number is + * exactly 1. "<plural>" is chosen otherwise. + * + * This format is consistent with the format supported by + * {@link \Symfony\Component\Translation\Translator}, but it does not + * have the same expressiveness. While Translator supports intervals in + * message translations, which are needed for languages other than English, + * this translator does not. You should use Translator or a custom + * implementation of {@link \Symfony\Component\Translation\TranslatorInterface} if you need this or similar + * functionality. + * + * Example usage: + * + * echo $translator->transChoice( + * 'This is {{ count }} donkey.|These are {{ count }} donkeys.', + * 0, + * array('{{ count }}' => 0) + * ); + * + * // -> These are 0 donkeys. + * + * echo $translator->transChoice( + * 'This is {{ count }} donkey.|These are {{ count }} donkeys.', + * 1, + * array('{{ count }}' => 1) + * ); + * + * // -> This is 1 donkey. + * + * echo $translator->transChoice( + * 'This is {{ count }} donkey.|These are {{ count }} donkeys.', + * 3, + * array('{{ count }}' => 3) + * ); + * + * // -> These are 3 donkeys. + * + * @param string $id The message id + * @param int $number The number to use to find the index of the message + * @param array $parameters An array of parameters for the message + * @param string $domain Ignored + * @param string $locale Ignored + * + * @return string The translated string + * + * @throws InvalidArgumentException if the message id does not have the format + * "singular|plural" + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + $ids = explode('|', $id); + + if (1 == $number) { + return strtr($ids[0], $parameters); + } + + if (!isset($ids[1])) { + throw new InvalidArgumentException(sprintf('The message "%s" cannot be pluralized, because it is missing a plural (e.g. "There is one apple|There are %%count%% apples").', $id)); + } + + return strtr($ids[1], $parameters); + } + + /** + * Not supported. + * + * @param string $locale The locale + * + * @throws BadMethodCallException + */ + public function setLocale($locale) + { + throw new BadMethodCallException('Unsupported method.'); + } + + /** + * Returns the locale of the translator. + * + * @return string Always returns 'en' + */ + public function getLocale() + { + return 'en'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/BadMethodCallException.php b/public/system/storage/vendor/symfony/validator/Exception/BadMethodCallException.php new file mode 100644 index 0000000..939161b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/BadMethodCallException.php @@ -0,0 +1,21 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base BadMethodCallException for the Validator component. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/ConstraintDefinitionException.php b/public/system/storage/vendor/symfony/validator/Exception/ConstraintDefinitionException.php new file mode 100644 index 0000000..b24fdd6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/ConstraintDefinitionException.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class ConstraintDefinitionException extends ValidatorException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/ExceptionInterface.php b/public/system/storage/vendor/symfony/validator/Exception/ExceptionInterface.php new file mode 100644 index 0000000..77d09b9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base ExceptionInterface for the Validator component. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/GroupDefinitionException.php b/public/system/storage/vendor/symfony/validator/Exception/GroupDefinitionException.php new file mode 100644 index 0000000..ab7e91d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/GroupDefinitionException.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class GroupDefinitionException extends ValidatorException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/InvalidArgumentException.php b/public/system/storage/vendor/symfony/validator/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..22da39b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base InvalidArgumentException for the Validator component. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/InvalidOptionsException.php b/public/system/storage/vendor/symfony/validator/Exception/InvalidOptionsException.php new file mode 100644 index 0000000..ce87c42 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/InvalidOptionsException.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class InvalidOptionsException extends ValidatorException +{ + private $options; + + public function __construct($message, array $options) + { + parent::__construct($message); + + $this->options = $options; + } + + public function getOptions() + { + return $this->options; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/MappingException.php b/public/system/storage/vendor/symfony/validator/Exception/MappingException.php new file mode 100644 index 0000000..4c8c057 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/MappingException.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class MappingException extends ValidatorException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/MissingOptionsException.php b/public/system/storage/vendor/symfony/validator/Exception/MissingOptionsException.php new file mode 100644 index 0000000..07c5d9e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/MissingOptionsException.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class MissingOptionsException extends ValidatorException +{ + private $options; + + public function __construct($message, array $options) + { + parent::__construct($message); + + $this->options = $options; + } + + public function getOptions() + { + return $this->options; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/NoSuchMetadataException.php b/public/system/storage/vendor/symfony/validator/Exception/NoSuchMetadataException.php new file mode 100644 index 0000000..4cac74c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/NoSuchMetadataException.php @@ -0,0 +1,19 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class NoSuchMetadataException extends ValidatorException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/OutOfBoundsException.php b/public/system/storage/vendor/symfony/validator/Exception/OutOfBoundsException.php new file mode 100644 index 0000000..30906e8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/OutOfBoundsException.php @@ -0,0 +1,21 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base OutOfBoundsException for the Validator component. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/RuntimeException.php b/public/system/storage/vendor/symfony/validator/Exception/RuntimeException.php new file mode 100644 index 0000000..df4a50c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/RuntimeException.php @@ -0,0 +1,21 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base RuntimeException for the Validator component. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/UnexpectedTypeException.php b/public/system/storage/vendor/symfony/validator/Exception/UnexpectedTypeException.php new file mode 100644 index 0000000..485dbca --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/UnexpectedTypeException.php @@ -0,0 +1,20 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class UnexpectedTypeException extends ValidatorException +{ + public function __construct($value, $expectedType) + { + parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, \is_object($value) ? \get_class($value) : \gettype($value))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/UnsupportedMetadataException.php b/public/system/storage/vendor/symfony/validator/Exception/UnsupportedMetadataException.php new file mode 100644 index 0000000..aff569b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/UnsupportedMetadataException.php @@ -0,0 +1,19 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class UnsupportedMetadataException extends InvalidArgumentException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/ValidatorException.php b/public/system/storage/vendor/symfony/validator/Exception/ValidatorException.php new file mode 100644 index 0000000..28bd470 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/ValidatorException.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class ValidatorException extends RuntimeException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/ExecutionContext.php b/public/system/storage/vendor/symfony/validator/ExecutionContext.php new file mode 100644 index 0000000..8d93e69 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ExecutionContext.php @@ -0,0 +1,269 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +@trigger_error('The '.__NAMESPACE__.'\ExecutionContext class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED); + +use Symfony\Component\Translation\TranslatorInterface; + +/** + * Default implementation of {@link ExecutionContextInterface}. + * + * This class is immutable by design. + * + * @author Fabien Potencier <fabien@symfony.com> + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Context\ExecutionContext} instead. + */ +class ExecutionContext implements ExecutionContextInterface +{ + private $globalContext; + private $translator; + private $translationDomain; + private $metadata; + private $value; + private $group; + private $propertyPath; + + /** + * Creates a new execution context. + * + * @param GlobalExecutionContextInterface $globalContext The global context storing node-independent state + * @param TranslatorInterface $translator The translator for translating violation messages + * @param string|null $translationDomain The domain of the validation messages + * @param MetadataInterface $metadata The metadata of the validated node + * @param mixed $value The value of the validated node + * @param string $group The current validation group + * @param string $propertyPath The property path to the current node + */ + public function __construct(GlobalExecutionContextInterface $globalContext, TranslatorInterface $translator, $translationDomain = null, MetadataInterface $metadata = null, $value = null, $group = null, $propertyPath = '') + { + if (null === $group) { + $group = Constraint::DEFAULT_GROUP; + } + + $this->globalContext = $globalContext; + $this->translator = $translator; + $this->translationDomain = $translationDomain; + $this->metadata = $metadata; + $this->value = $value; + $this->propertyPath = $propertyPath; + $this->group = $group; + } + + /** + * {@inheritdoc} + */ + public function addViolation($message, array $params = array(), $invalidValue = null, $plural = null, $code = null) + { + if (null === $plural) { + $translatedMessage = $this->translator->trans($message, $params, $this->translationDomain); + } else { + try { + $translatedMessage = $this->translator->transChoice($message, $plural, $params, $this->translationDomain); + } catch (\InvalidArgumentException $e) { + $translatedMessage = $this->translator->trans($message, $params, $this->translationDomain); + } + } + + $this->globalContext->getViolations()->add(new ConstraintViolation( + $translatedMessage, + $message, + $params, + $this->globalContext->getRoot(), + $this->propertyPath, + // check using func_num_args() to allow passing null values + \func_num_args() >= 3 ? $invalidValue : $this->value, + $plural, + $code + )); + } + + /** + * {@inheritdoc} + */ + public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) + { + $this->globalContext->getViolations()->add(new ConstraintViolation( + null === $plural + ? $this->translator->trans($message, $parameters, $this->translationDomain) + : $this->translator->transChoice($message, $plural, $parameters, $this->translationDomain), + $message, + $parameters, + $this->globalContext->getRoot(), + $this->getPropertyPath($subPath), + // check using func_num_args() to allow passing null values + \func_num_args() >= 4 ? $invalidValue : $this->value, + $plural, + $code + )); + } + + /** + * {@inheritdoc} + */ + public function getViolations() + { + return $this->globalContext->getViolations(); + } + + /** + * {@inheritdoc} + */ + public function getRoot() + { + return $this->globalContext->getRoot(); + } + + /** + * {@inheritdoc} + */ + public function getPropertyPath($subPath = '') + { + if ('' != $subPath && '' !== $this->propertyPath && '[' !== $subPath[0]) { + return $this->propertyPath.'.'.$subPath; + } + + return $this->propertyPath.$subPath; + } + + /** + * {@inheritdoc} + */ + public function getClassName() + { + if ($this->metadata instanceof ClassBasedInterface) { + return $this->metadata->getClassName(); + } + } + + /** + * {@inheritdoc} + */ + public function getPropertyName() + { + if ($this->metadata instanceof PropertyMetadataInterface) { + return $this->metadata->getPropertyName(); + } + } + + /** + * {@inheritdoc} + */ + public function getValue() + { + return $this->value; + } + + /** + * {@inheritdoc} + */ + public function getGroup() + { + return $this->group; + } + + /** + * {@inheritdoc} + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * {@inheritdoc} + */ + public function getMetadataFor($value) + { + return $this->globalContext->getMetadataFactory()->getMetadataFor($value); + } + + /** + * {@inheritdoc} + */ + public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false) + { + $propertyPath = $this->getPropertyPath($subPath); + + $visitor = $this->globalContext->getVisitor(); + foreach ($this->resolveGroups($groups) as $group) { + $visitor->validate($value, $group, $propertyPath, $traverse, $deep); + } + } + + /** + * {@inheritdoc} + */ + public function validateValue($value, $constraints, $subPath = '', $groups = null) + { + $constraints = \is_array($constraints) ? $constraints : array($constraints); + + if (null === $groups && '' === $subPath) { + $context = clone $this; + $context->value = $value; + $context->executeConstraintValidators($value, $constraints); + + return; + } + + $propertyPath = $this->getPropertyPath($subPath); + + foreach ($this->resolveGroups($groups) as $group) { + $context = clone $this; + $context->value = $value; + $context->group = $group; + $context->propertyPath = $propertyPath; + $context->executeConstraintValidators($value, $constraints); + } + } + + /** + * {@inheritdoc} + */ + public function getMetadataFactory() + { + return $this->globalContext->getMetadataFactory(); + } + + /** + * Executes the validators of the given constraints for the given value. + * + * @param mixed $value The value to validate + * @param Constraint[] $constraints The constraints to match against + */ + private function executeConstraintValidators($value, array $constraints) + { + foreach ($constraints as $constraint) { + $validator = $this->globalContext->getValidatorFactory()->getInstance($constraint); + $validator->initialize($this); + $validator->validate($value, $constraint); + } + } + + /** + * Returns an array of group names. + * + * @param string|string[]|null $groups The groups to resolve. If a single string is + * passed, it is converted to an array. If null + * is passed, an array containing the current + * group of the context is returned. + * + * @return array An array of validation groups + */ + private function resolveGroups($groups) + { + return $groups ? (array) $groups : (array) $this->group; + } +} diff --git a/public/system/storage/vendor/symfony/validator/ExecutionContextInterface.php b/public/system/storage/vendor/symfony/validator/ExecutionContextInterface.php new file mode 100644 index 0000000..4d5d2f6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ExecutionContextInterface.php @@ -0,0 +1,299 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Stores the validator's state during validation. + * + * For example, let's validate the following object graph: + * + * (Person)---($firstName: string) + * \ + * ($address: Address)---($street: string) + * + * We validate the <tt>Person</tt> instance, which becomes the "root" of the + * validation run (see {@link getRoot}). The state of the context after the + * first step will be like this: + * + * (Person)---($firstName: string) + * ^ \ + * ($address: Address)---($street: string) + * + * The validator is stopped at the <tt>Person</tt> node, both the root and the + * value (see {@link getValue}) of the context point to the <tt>Person</tt> + * instance. The property path is empty at this point (see {@link getPropertyPath}). + * The metadata of the context is the metadata of the <tt>Person</tt> node + * (see {@link getMetadata}). + * + * After advancing to the property <tt>$firstName</tt> of the <tt>Person</tt> + * instance, the state of the context looks like this: + * + * (Person)---($firstName: string) + * \ ^ + * ($address: Address)---($street: string) + * + * The validator is stopped at the property <tt>$firstName</tt>. The root still + * points to the <tt>Person</tt> instance, because this is where the validation + * started. The property path is now "firstName" and the current value is the + * value of that property. + * + * After advancing to the <tt>$address</tt> property and then to the + * <tt>$street</tt> property of the <tt>Address</tt> instance, the context state + * looks like this: + * + * (Person)---($firstName: string) + * \ + * ($address: Address)---($street: string) + * ^ + * + * The validator is stopped at the property <tt>$street</tt>. The root still + * points to the <tt>Person</tt> instance, but the property path is now + * "address.street" and the validated value is the value of that property. + * + * Apart from the root, the property path and the currently validated value, + * the execution context also knows the metadata of the current node (see + * {@link getMetadata}) which for example returns a {@link Mapping\PropertyMetadata} + * or a {@link Mapping\ClassMetadata} object. he context also contains the + * validation group that is currently being validated (see {@link getGroup}) and + * the violations that happened up until now (see {@link getViolations}). + * + * Apart from reading the execution context, you can also use + * {@link addViolation} or {@link addViolationAt} to add new violations and + * {@link validate} or {@link validateValue} to validate values that the + * validator otherwise would not reach. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Context\ExecutionContextInterface} instead. + */ +interface ExecutionContextInterface +{ + /** + * Adds a violation at the current node of the validation graph. + * + * Note: the parameters $invalidValue, $plural and $code are deprecated since version 2.5 and will be removed in 3.0. + * + * @param string $message The error message + * @param array $params The parameters substituted in the error message + * @param mixed $invalidValue The invalid, validated value + * @param int|null $plural The number to use to pluralize of the message + * @param int|null $code The violation code + */ + public function addViolation($message, array $params = array(), $invalidValue = null, $plural = null, $code = null); + + /** + * Adds a violation at the validation graph node with the given property + * path relative to the current property path. + * + * @param string $subPath The relative property path for the violation + * @param string $message The error message + * @param array $parameters The parameters substituted in the error message + * @param mixed $invalidValue The invalid, validated value + * @param int|null $plural The number to use to pluralize of the message + * @param int|null $code The violation code + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Context\ExecutionContextInterface::buildViolation()} + * instead. + */ + public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null); + + /** + * Validates the given value within the scope of the current validation. + * + * The value may be any value recognized by the used metadata factory + * (see {@link MetadataFactoryInterface::getMetadata}), or an array or a + * traversable object of such values. + * + * Usually you validate a value that is not the current node of the + * execution context. For this case, you can pass the {@link $subPath} + * argument which is appended to the current property path when a violation + * is created. For example, take the following object graph: + * + * (Person)---($address: Address)---($phoneNumber: PhoneNumber) + * + * When the execution context stops at the <tt>Person</tt> instance, the + * property path is "address". When you validate the <tt>PhoneNumber</tt> + * instance now, pass "phoneNumber" as sub path to correct the property path + * to "address.phoneNumber": + * + * $context->validate($address->phoneNumber, 'phoneNumber'); + * + * Any violations generated during the validation will be added to the + * violation list that you can access with {@link getViolations}. + * + * @param mixed $value The value to validate + * @param string $subPath The path to append to the context's property path + * @param string|string[]|null $groups The groups to validate in. If you don't pass any + * groups here, the current group of the context + * will be used. + * @param bool $traverse Whether to traverse the value if it is an array + * or an instance of <tt>\Traversable</tt> + * @param bool $deep Whether to traverse the value recursively if + * it is a collection of collections + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Context\ExecutionContextInterface::getValidator()} + * instead. + */ + public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false); + + /** + * Validates a value against a constraint. + * + * Use the parameter <tt>$subPath</tt> to adapt the property path for the + * validated value. For example, take the following object graph: + * + * (Person)---($address: Address)---($street: string) + * + * When the validator validates the <tt>Address</tt> instance, the + * property path stored in the execution context is "address". When you + * manually validate the property <tt>$street</tt> now, pass the sub path + * "street" to adapt the full property path to "address.street": + * + * $context->validate($address->street, new NotNull(), 'street'); + * + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param string $subPath The path to append to the context's property path + * @param string|string[]|null $groups The groups to validate in. If you don't pass any + * groups here, the current group of the context + * will be used. + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Context\ExecutionContextInterface::getValidator()} + * instead. + */ + public function validateValue($value, $constraints, $subPath = '', $groups = null); + + /** + * Returns the violations generated by the validator so far. + * + * @return ConstraintViolationListInterface The constraint violation list + */ + public function getViolations(); + + /** + * Returns the value at which validation was started in the object graph. + * + * The validator, when given an object, traverses the properties and + * related objects and their properties. The root of the validation is the + * object from which the traversal started. + * + * The current value is returned by {@link getValue}. + * + * @return mixed The root value of the validation + */ + public function getRoot(); + + /** + * Returns the value that the validator is currently validating. + * + * If you want to retrieve the object that was originally passed to the + * validator, use {@link getRoot}. + * + * @return mixed The currently validated value + */ + public function getValue(); + + /** + * Returns the metadata for the currently validated value. + * + * With the core implementation, this method returns a + * {@link Mapping\ClassMetadata} instance if the current value is an object, + * a {@link Mapping\PropertyMetadata} instance if the current value is + * the value of a property and a {@link Mapping\GetterMetadata} instance if + * the validated value is the result of a getter method. + * + * If the validated value is neither of these, for example if the validator + * has been called with a plain value and constraint, this method returns + * null. + * + * @return MetadataInterface|null the metadata of the currently validated + * value + */ + public function getMetadata(); + + /** + * Returns the used metadata factory. + * + * @return MetadataFactoryInterface The metadata factory + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Context\ExecutionContextInterface::getValidator()} + * instead and call + * {@link Validator\ValidatorInterface::getMetadataFor()} or + * {@link Validator\ValidatorInterface::hasMetadataFor()} there. + */ + public function getMetadataFactory(); + + /** + * Returns the validation group that is currently being validated. + * + * @return string The current validation group + */ + public function getGroup(); + + /** + * Returns the class name of the current node. + * + * If the metadata of the current node does not implement + * {@link ClassBasedInterface} or if no metadata is available for the + * current node, this method returns null. + * + * @return string|null The class name or null, if no class name could be found + */ + public function getClassName(); + + /** + * Returns the property name of the current node. + * + * If the metadata of the current node does not implement + * {@link PropertyMetadataInterface} or if no metadata is available for the + * current node, this method returns null. + * + * @return string|null The property name or null, if no property name could be found + */ + public function getPropertyName(); + + /** + * Returns the property path to the value that the validator is currently + * validating. + * + * For example, take the following object graph: + * + * (Person)---($address: Address)---($street: string) + * + * When the <tt>Person</tt> instance is passed to the validator, the + * property path is initially empty. When the <tt>$address</tt> property + * of that person is validated, the property path is "address". When + * the <tt>$street</tt> property of the related <tt>Address</tt> instance + * is validated, the property path is "address.street". + * + * Properties of objects are prefixed with a dot in the property path. + * Indices of arrays or objects implementing the {@link \ArrayAccess} + * interface are enclosed in brackets. For example, if the property in + * the previous example is <tt>$addresses</tt> and contains an array + * of <tt>Address</tt> instance, the property path generated for the + * <tt>$street</tt> property of one of these addresses is for example + * "addresses[0].street". + * + * @param string $subPath Optional. The suffix appended to the current + * property path. + * + * @return string The current property path. The result may be an empty + * string if the validator is currently validating the + * root value of the validation graph. + */ + public function getPropertyPath($subPath = ''); +} diff --git a/public/system/storage/vendor/symfony/validator/GlobalExecutionContextInterface.php b/public/system/storage/vendor/symfony/validator/GlobalExecutionContextInterface.php new file mode 100644 index 0000000..d9bd315 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/GlobalExecutionContextInterface.php @@ -0,0 +1,71 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Stores the node-independent state of a validation run. + * + * When the validator validates a graph of objects, it uses two classes to + * store the state during the validation: + * + * <ul> + * <li>For each node in the validation graph (objects, properties, getters) the + * validator creates an instance of {@link ExecutionContextInterface} that + * stores the information about that node.</li> + * <li>One single <tt>GlobalExecutionContextInterface</tt> stores the state + * that is independent of the current node.</li> + * </ul> + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Context\ExecutionContextInterface} instead. + */ +interface GlobalExecutionContextInterface +{ + /** + * Returns the violations generated by the validator so far. + * + * @return ConstraintViolationListInterface A list of constraint violations + */ + public function getViolations(); + + /** + * Returns the value at which validation was started in the object graph. + * + * @return mixed The root value + * + * @see ExecutionContextInterface::getRoot() + */ + public function getRoot(); + + /** + * Returns the visitor instance used to validate the object graph nodes. + * + * @return ValidationVisitorInterface The validation visitor + */ + public function getVisitor(); + + /** + * Returns the factory for constraint validators. + * + * @return ConstraintValidatorFactoryInterface The constraint validator factory + */ + public function getValidatorFactory(); + + /** + * Returns the factory for validation metadata objects. + * + * @return MetadataFactoryInterface The metadata factory + */ + public function getMetadataFactory(); +} diff --git a/public/system/storage/vendor/symfony/validator/GroupSequenceProviderInterface.php b/public/system/storage/vendor/symfony/validator/GroupSequenceProviderInterface.php new file mode 100644 index 0000000..5894397 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/GroupSequenceProviderInterface.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Constraints\GroupSequence; + +/** + * Defines the interface for a group sequence provider. + */ +interface GroupSequenceProviderInterface +{ + /** + * Returns which validation groups should be used for a certain state + * of the object. + * + * @return string[]|GroupSequence An array of validation groups + */ + public function getGroupSequence(); +} diff --git a/public/system/storage/vendor/symfony/validator/LICENSE b/public/system/storage/vendor/symfony/validator/LICENSE new file mode 100644 index 0000000..21d7fb9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2018 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/system/storage/vendor/symfony/validator/Mapping/BlackholeMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Mapping/BlackholeMetadataFactory.php new file mode 100644 index 0000000..34a3b44 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/BlackholeMetadataFactory.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +@trigger_error('The '.__NAMESPACE__.'\BlackholeMetadataFactory class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory class instead.', E_USER_DEPRECATED); + +use Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory as MappingBlackHoleMetadataFactory; + +/** + * Alias of {@link Factory\BlackHoleMetadataFactory}. + * + * @author Fabien Potencier <fabien@symfony.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Factory\BlackHoleMetadataFactory} instead. + */ +class BlackholeMetadataFactory extends MappingBlackHoleMetadataFactory +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Cache/ApcCache.php b/public/system/storage/vendor/symfony/validator/Mapping/Cache/ApcCache.php new file mode 100644 index 0000000..0adaf04 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Cache/ApcCache.php @@ -0,0 +1,57 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Cache; + +@trigger_error('The '.__NAMESPACE__.'\ApcCache class is deprecated since Symfony 2.5 and will be removed in 3.0. Use DoctrineCache with the Doctrine\Common\Cache\ApcCache class instead.', E_USER_DEPRECATED); + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * @deprecated since version 2.5, to be removed in 3.0. + * Use DoctrineCache with \Doctrine\Common\Cache\ApcCache instead. + */ +class ApcCache implements CacheInterface +{ + private $prefix; + + public function __construct($prefix) + { + if (!\extension_loaded('apc')) { + throw new \RuntimeException('Unable to use ApcCache to cache validator mappings as APC is not enabled.'); + } + + $this->prefix = $prefix; + } + + public function has($class) + { + if (!\function_exists('apc_exists')) { + $exists = false; + + apc_fetch($this->prefix.$class, $exists); + + return $exists; + } + + return apc_exists($this->prefix.$class); + } + + public function read($class) + { + return apc_fetch($this->prefix.$class); + } + + public function write(ClassMetadata $metadata) + { + apc_store($this->prefix.$metadata->getClassName(), $metadata); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Cache/CacheInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/Cache/CacheInterface.php new file mode 100644 index 0000000..f770f46 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Cache/CacheInterface.php @@ -0,0 +1,43 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Cache; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Persists ClassMetadata instances in a cache. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface CacheInterface +{ + /** + * Returns whether metadata for the given class exists in the cache. + * + * @param string $class + */ + public function has($class); + + /** + * Returns the metadata for the given class from the cache. + * + * @param string $class Class Name + * + * @return ClassMetadata|false A ClassMetadata instance or false on miss + */ + public function read($class); + + /** + * Stores a class metadata in the cache. + */ + public function write(ClassMetadata $metadata); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Cache/DoctrineCache.php b/public/system/storage/vendor/symfony/validator/Mapping/Cache/DoctrineCache.php new file mode 100644 index 0000000..36f1feb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Cache/DoctrineCache.php @@ -0,0 +1,59 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Cache; + +use Doctrine\Common\Cache\Cache; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Adapts a Doctrine cache to a CacheInterface. + * + * @author Florian Voutzinos <florian@voutzinos.com> + */ +final class DoctrineCache implements CacheInterface +{ + private $cache; + + public function __construct(Cache $cache) + { + $this->cache = $cache; + } + + public function setCache(Cache $cache) + { + $this->cache = $cache; + } + + /** + * {@inheritdoc} + */ + public function has($class) + { + return $this->cache->contains($class); + } + + /** + * {@inheritdoc} + */ + public function read($class) + { + return $this->cache->fetch($class); + } + + /** + * {@inheritdoc} + */ + public function write(ClassMetadata $metadata) + { + $this->cache->save($metadata->getClassName(), $metadata); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/CascadingStrategy.php b/public/system/storage/vendor/symfony/validator/Mapping/CascadingStrategy.php new file mode 100644 index 0000000..c78fb42 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/CascadingStrategy.php @@ -0,0 +1,52 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +/** + * Specifies whether an object should be cascaded. + * + * Cascading is relevant for any node type but class nodes. If such a node + * contains an object of value, and if cascading is enabled, then the node + * traverser will try to find class metadata for that object and validate the + * object against that metadata. + * + * If no metadata is found for a cascaded object, and if that object implements + * {@link \Traversable}, the node traverser will iterate over the object and + * cascade each object or collection contained within, unless iteration is + * prohibited by the specified {@link TraversalStrategy}. + * + * Although the constants currently represent a boolean switch, they are + * implemented as bit mask in order to allow future extensions. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see TraversalStrategy + */ +class CascadingStrategy +{ + /** + * Specifies that a node should not be cascaded. + */ + const NONE = 1; + + /** + * Specifies that a node should be cascaded. + */ + const CASCADE = 2; + + /** + * Not instantiable. + */ + private function __construct() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadata.php new file mode 100644 index 0000000..c3a6544 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadata.php @@ -0,0 +1,591 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\Traverse; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\GroupDefinitionException; +use Symfony\Component\Validator\ValidationVisitorInterface; + +/** + * Default implementation of {@link ClassMetadataInterface}. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * @author Fabien Potencier <fabien@symfony.com> + */ +class ClassMetadata extends ElementMetadata implements ClassMetadataInterface +{ + /** + * @var string + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getClassName()} instead. + */ + public $name; + + /** + * @var string + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getDefaultGroup()} instead. + */ + public $defaultGroup; + + /** + * @var MemberMetadata[][] + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getPropertyMetadata()} instead. + */ + public $members = array(); + + /** + * @var PropertyMetadata[] + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getPropertyMetadata()} instead. + */ + public $properties = array(); + + /** + * @var GetterMetadata[] + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getPropertyMetadata()} instead. + */ + public $getters = array(); + + /** + * @var array + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getGroupSequence()} instead. + */ + public $groupSequence = array(); + + /** + * @var bool + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link isGroupSequenceProvider()} instead. + */ + public $groupSequenceProvider = false; + + /** + * The strategy for traversing traversable objects. + * + * By default, only instances of {@link \Traversable} are traversed. + * + * @var int + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getTraversalStrategy()} instead. + */ + public $traversalStrategy = TraversalStrategy::IMPLICIT; + + /** + * @var \ReflectionClass + */ + private $reflClass; + + /** + * Constructs a metadata for the given class. + * + * @param string $class + */ + public function __construct($class) + { + $this->name = $class; + // class name without namespace + if (false !== $nsSep = strrpos($class, '\\')) { + $this->defaultGroup = substr($class, $nsSep + 1); + } else { + $this->defaultGroup = $class; + } + } + + /** + * {@inheritdoc} + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + if (null === $propagatedGroup && Constraint::DEFAULT_GROUP === $group + && ($this->hasGroupSequence() || $this->isGroupSequenceProvider())) { + if ($this->hasGroupSequence()) { + $groups = $this->getGroupSequence()->groups; + } else { + $groups = $value->getGroupSequence(); + } + + foreach ($groups as $group) { + $this->accept($visitor, $value, $group, $propertyPath, Constraint::DEFAULT_GROUP); + + if (\count($visitor->getViolations()) > 0) { + break; + } + } + + return; + } + + $visitor->visit($this, $value, $group, $propertyPath); + + if (null !== $value) { + $pathPrefix = empty($propertyPath) ? '' : $propertyPath.'.'; + + foreach ($this->getConstrainedProperties() as $property) { + foreach ($this->getPropertyMetadata($property) as $member) { + $member->accept($visitor, $member->getPropertyValue($value), $group, $pathPrefix.$property, $propagatedGroup); + } + } + } + } + + /** + * {@inheritdoc} + */ + public function __sleep() + { + $parentProperties = parent::__sleep(); + + // Don't store the cascading strategy. Classes never cascade. + unset($parentProperties[array_search('cascadingStrategy', $parentProperties)]); + + return array_merge($parentProperties, array( + 'getters', + 'groupSequence', + 'groupSequenceProvider', + 'members', + 'name', + 'properties', + 'defaultGroup', + )); + } + + /** + * {@inheritdoc} + */ + public function getClassName() + { + return $this->name; + } + + /** + * Returns the name of the default group for this class. + * + * For each class, the group "Default" is an alias for the group + * "<ClassName>", where <ClassName> is the non-namespaced name of the + * class. All constraints implicitly or explicitly assigned to group + * "Default" belong to both of these groups, unless the class defines + * a group sequence. + * + * If a class defines a group sequence, validating the class in "Default" + * will validate the group sequence. The constraints assigned to "Default" + * can still be validated by validating the class in "<ClassName>". + * + * @return string The name of the default group + */ + public function getDefaultGroup() + { + return $this->defaultGroup; + } + + /** + * {@inheritdoc} + */ + public function addConstraint(Constraint $constraint) + { + if (!\in_array(Constraint::CLASS_CONSTRAINT, (array) $constraint->getTargets())) { + throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', \get_class($constraint))); + } + + if ($constraint instanceof Valid) { + throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', \get_class($constraint))); + } + + if ($constraint instanceof Traverse) { + if ($constraint->traverse) { + // If traverse is true, traversal should be explicitly enabled + $this->traversalStrategy = TraversalStrategy::TRAVERSE; + } else { + // If traverse is false, traversal should be explicitly disabled + $this->traversalStrategy = TraversalStrategy::NONE; + } + + // The constraint is not added + return $this; + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + parent::addConstraint($constraint); + + return $this; + } + + /** + * Adds a constraint to the given property. + * + * @param string $property The name of the property + * @param Constraint $constraint The constraint + * + * @return $this + */ + public function addPropertyConstraint($property, Constraint $constraint) + { + if (!isset($this->properties[$property])) { + $this->properties[$property] = new PropertyMetadata($this->getClassName(), $property); + + $this->addPropertyMetadata($this->properties[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->properties[$property]->addConstraint($constraint); + + return $this; + } + + /** + * @param string $property + * @param Constraint[] $constraints + * + * @return $this + */ + public function addPropertyConstraints($property, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addPropertyConstraint($property, $constraint); + } + + return $this; + } + + /** + * Adds a constraint to the getter of the given property. + * + * The name of the getter is assumed to be the name of the property with an + * uppercased first letter and either the prefix "get" or "is". + * + * @param string $property The name of the property + * @param Constraint $constraint The constraint + * + * @return $this + */ + public function addGetterConstraint($property, Constraint $constraint) + { + if (!isset($this->getters[$property])) { + $this->getters[$property] = new GetterMetadata($this->getClassName(), $property); + + $this->addPropertyMetadata($this->getters[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->getters[$property]->addConstraint($constraint); + + return $this; + } + + /** + * Adds a constraint to the getter of the given property. + * + * @param string $property The name of the property + * @param string $method The name of the getter method + * @param Constraint $constraint The constraint + * + * @return $this + */ + public function addGetterMethodConstraint($property, $method, Constraint $constraint) + { + if (!isset($this->getters[$property])) { + $this->getters[$property] = new GetterMetadata($this->getClassName(), $property, $method); + + $this->addPropertyMetadata($this->getters[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->getters[$property]->addConstraint($constraint); + + return $this; + } + + /** + * @param string $property + * @param Constraint[] $constraints + * + * @return $this + */ + public function addGetterConstraints($property, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addGetterConstraint($property, $constraint); + } + + return $this; + } + + /** + * @param string $property + * @param string $method + * @param Constraint[] $constraints + * + * @return $this + */ + public function addGetterMethodConstraints($property, $method, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addGetterMethodConstraint($property, $method, $constraint); + } + + return $this; + } + + /** + * Merges the constraints of the given metadata into this object. + */ + public function mergeConstraints(ClassMetadata $source) + { + if ($source->isGroupSequenceProvider()) { + $this->setGroupSequenceProvider(true); + } + + foreach ($source->getConstraints() as $constraint) { + $this->addConstraint(clone $constraint); + } + + foreach ($source->getConstrainedProperties() as $property) { + foreach ($source->getPropertyMetadata($property) as $member) { + $member = clone $member; + + foreach ($member->getConstraints() as $constraint) { + if (\in_array($constraint::DEFAULT_GROUP, $constraint->groups, true)) { + $member->constraintsByGroup[$this->getDefaultGroup()][] = $constraint; + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + } + + $this->addPropertyMetadata($member); + + if ($member instanceof MemberMetadata && !$member->isPrivate($this->name)) { + $property = $member->getPropertyName(); + + if ($member instanceof PropertyMetadata && !isset($this->properties[$property])) { + $this->properties[$property] = $member; + } elseif ($member instanceof GetterMetadata && !isset($this->getters[$property])) { + $this->getters[$property] = $member; + } + } + } + } + } + + /** + * Adds a member metadata. + * + * @param MemberMetadata $metadata + * + * @deprecated since version 2.6, to be removed in 3.0. + */ + protected function addMemberMetadata(MemberMetadata $metadata) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the addPropertyMetadata() method instead.', E_USER_DEPRECATED); + + $this->addPropertyMetadata($metadata); + } + + /** + * Returns true if metadatas of members is present for the given property. + * + * @param string $property The name of the property + * + * @return bool + * + * @deprecated since version 2.6, to be removed in 3.0. Use {@link hasPropertyMetadata} instead. + */ + public function hasMemberMetadatas($property) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the hasPropertyMetadata() method instead.', E_USER_DEPRECATED); + + return $this->hasPropertyMetadata($property); + } + + /** + * Returns all metadatas of members describing the given property. + * + * @param string $property The name of the property + * + * @return MemberMetadata[] An array of MemberMetadata + * + * @deprecated since version 2.6, to be removed in 3.0. Use {@link getPropertyMetadata} instead. + */ + public function getMemberMetadatas($property) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the getPropertyMetadata() method instead.', E_USER_DEPRECATED); + + return $this->getPropertyMetadata($property); + } + + /** + * {@inheritdoc} + */ + public function hasPropertyMetadata($property) + { + return array_key_exists($property, $this->members); + } + + /** + * {@inheritdoc} + */ + public function getPropertyMetadata($property) + { + if (!isset($this->members[$property])) { + return array(); + } + + return $this->members[$property]; + } + + /** + * {@inheritdoc} + */ + public function getConstrainedProperties() + { + return array_keys($this->members); + } + + /** + * Sets the default group sequence for this class. + * + * @param string[]|GroupSequence $groupSequence An array of group names + * + * @return $this + * + * @throws GroupDefinitionException + */ + public function setGroupSequence($groupSequence) + { + if ($this->isGroupSequenceProvider()) { + throw new GroupDefinitionException('Defining a static group sequence is not allowed with a group sequence provider'); + } + + if (\is_array($groupSequence)) { + $groupSequence = new GroupSequence($groupSequence); + } + + if (\in_array(Constraint::DEFAULT_GROUP, $groupSequence->groups, true)) { + throw new GroupDefinitionException(sprintf('The group "%s" is not allowed in group sequences', Constraint::DEFAULT_GROUP)); + } + + if (!\in_array($this->getDefaultGroup(), $groupSequence->groups, true)) { + throw new GroupDefinitionException(sprintf('The group "%s" is missing in the group sequence', $this->getDefaultGroup())); + } + + $this->groupSequence = $groupSequence; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function hasGroupSequence() + { + return $this->groupSequence && \count($this->groupSequence->groups) > 0; + } + + /** + * {@inheritdoc} + */ + public function getGroupSequence() + { + return $this->groupSequence; + } + + /** + * Returns a ReflectionClass instance for this class. + * + * @return \ReflectionClass + */ + public function getReflectionClass() + { + if (!$this->reflClass) { + $this->reflClass = new \ReflectionClass($this->getClassName()); + } + + return $this->reflClass; + } + + /** + * Sets whether a group sequence provider should be used. + * + * @param bool $active + * + * @throws GroupDefinitionException + */ + public function setGroupSequenceProvider($active) + { + if ($this->hasGroupSequence()) { + throw new GroupDefinitionException('Defining a group sequence provider is not allowed with a static group sequence'); + } + + if (!$this->getReflectionClass()->implementsInterface('Symfony\Component\Validator\GroupSequenceProviderInterface')) { + throw new GroupDefinitionException(sprintf('Class "%s" must implement GroupSequenceProviderInterface', $this->name)); + } + + $this->groupSequenceProvider = $active; + } + + /** + * {@inheritdoc} + */ + public function isGroupSequenceProvider() + { + return $this->groupSequenceProvider; + } + + /** + * Class nodes are never cascaded. + * + * {@inheritdoc} + */ + public function getCascadingStrategy() + { + return CascadingStrategy::NONE; + } + + private function addPropertyMetadata(PropertyMetadataInterface $metadata) + { + $property = $metadata->getPropertyName(); + + $this->members[$property][] = $metadata; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataFactory.php new file mode 100644 index 0000000..17c459b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataFactory.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +@trigger_error('The '.__NAMESPACE__.'\ClassMetadataFactory class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory class instead.', E_USER_DEPRECATED); + +use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; + +/** + * Alias of {@link LazyLoadingMetadataFactory}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link LazyLoadingMetadataFactory} instead. + */ +class ClassMetadataFactory extends LazyLoadingMetadataFactory +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataInterface.php new file mode 100644 index 0000000..d8c3d84 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataInterface.php @@ -0,0 +1,79 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\ClassBasedInterface; +use Symfony\Component\Validator\PropertyMetadataContainerInterface as LegacyPropertyMetadataContainerInterface; + +/** + * Stores all metadata needed for validating objects of specific class. + * + * Most importantly, the metadata stores the constraints against which an object + * and its properties should be validated. + * + * Additionally, the metadata stores whether the "Default" group is overridden + * by a group sequence for that class and whether instances of that class + * should be traversed or not. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see MetadataInterface + * @see \Symfony\Component\Validator\Constraints\GroupSequence + * @see \Symfony\Component\Validator\GroupSequenceProviderInterface + * @see TraversalStrategy + */ +interface ClassMetadataInterface extends MetadataInterface, LegacyPropertyMetadataContainerInterface, ClassBasedInterface +{ + /** + * Returns the names of all constrained properties. + * + * @return string[] A list of property names + */ + public function getConstrainedProperties(); + + /** + * Returns whether the "Default" group is overridden by a group sequence. + * + * If it is, you can access the group sequence with {@link getGroupSequence()}. + * + * @return bool Returns true if the "Default" group is overridden + * + * @see \Symfony\Component\Validator\Constraints\GroupSequence + */ + public function hasGroupSequence(); + + /** + * Returns the group sequence that overrides the "Default" group for this + * class. + * + * @return \Symfony\Component\Validator\Constraints\GroupSequence|null The group sequence or null + * + * @see \Symfony\Component\Validator\Constraints\GroupSequence + */ + public function getGroupSequence(); + + /** + * Returns whether the "Default" group is overridden by a dynamic group + * sequence obtained by the validated objects. + * + * If this method returns true, the class must implement + * {@link \Symfony\Component\Validator\GroupSequenceProviderInterface}. + * This interface will be used to obtain the group sequence when an object + * of this class is validated. + * + * @return bool Returns true if the "Default" group is overridden by + * a dynamic group sequence + * + * @see \Symfony\Component\Validator\GroupSequenceProviderInterface + */ + public function isGroupSequenceProvider(); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/ElementMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/ElementMetadata.php new file mode 100644 index 0000000..2c9b080 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/ElementMetadata.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +/** + * Contains the metadata of a structural element. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Extend {@link GenericMetadata} instead. + */ +abstract class ElementMetadata extends GenericMetadata +{ + public function __construct() + { + if (!$this instanceof MemberMetadata && !$this instanceof ClassMetadata) { + @trigger_error('The '.__CLASS__.' class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\GenericMetadata class instead.', E_USER_DEPRECATED); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php new file mode 100644 index 0000000..5b38d0c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php @@ -0,0 +1,40 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Factory; + +/** + * Metadata factory that does not store metadata. + * + * This implementation is useful if you want to validate values against + * constraints only and you don't need to add constraints to classes and + * properties. + * + * @author Fabien Potencier <fabien@symfony.com> + */ +class BlackHoleMetadataFactory implements MetadataFactoryInterface +{ + /** + * {@inheritdoc} + */ + public function getMetadataFor($value) + { + throw new \LogicException('This class does not support metadata.'); + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($value) + { + return false; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php new file mode 100644 index 0000000..fc1236e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php @@ -0,0 +1,167 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Factory; + +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\Mapping\Cache\CacheInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\ClassMetadataInterface; +use Symfony\Component\Validator\Mapping\Loader\LoaderChain; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; + +/** + * Creates new {@link ClassMetadataInterface} instances. + * + * Whenever {@link getMetadataFor()} is called for the first time with a given + * class name or object of that class, a new metadata instance is created and + * returned. On subsequent requests for the same class, the same metadata + * instance will be returned. + * + * You can optionally pass a {@link LoaderInterface} instance to the constructor. + * Whenever a new metadata instance is created, it is passed to the loader, + * which can configure the metadata based on configuration loaded from the + * filesystem or a database. If you want to use multiple loaders, wrap them in a + * {@link LoaderChain}. + * + * You can also optionally pass a {@link CacheInterface} instance to the + * constructor. This cache will be used for persisting the generated metadata + * between multiple PHP requests. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LazyLoadingMetadataFactory implements MetadataFactoryInterface +{ + protected $loader; + protected $cache; + + /** + * The loaded metadata, indexed by class name. + * + * @var ClassMetadata[] + */ + protected $loadedClasses = array(); + + /** + * Creates a new metadata factory. + * + * @param LoaderInterface|null $loader The loader for configuring new metadata + * @param CacheInterface|null $cache The cache for persisting metadata + * between multiple PHP requests + */ + public function __construct(LoaderInterface $loader = null, CacheInterface $cache = null) + { + $this->loader = $loader; + $this->cache = $cache; + } + + /** + * {@inheritdoc} + * + * If the method was called with the same class name (or an object of that + * class) before, the same metadata instance is returned. + * + * If the factory was configured with a cache, this method will first look + * for an existing metadata instance in the cache. If an existing instance + * is found, it will be returned without further ado. + * + * Otherwise, a new metadata instance is created. If the factory was + * configured with a loader, the metadata is passed to the + * {@link LoaderInterface::loadClassMetadata()} method for further + * configuration. At last, the new object is returned. + */ + public function getMetadataFor($value) + { + if (!\is_object($value) && !\is_string($value)) { + throw new NoSuchMetadataException(sprintf('Cannot create metadata for non-objects. Got: %s', \gettype($value))); + } + + $class = ltrim(\is_object($value) ? \get_class($value) : $value, '\\'); + + if (isset($this->loadedClasses[$class])) { + return $this->loadedClasses[$class]; + } + + if (!class_exists($class) && !interface_exists($class, false)) { + throw new NoSuchMetadataException(sprintf('The class or interface "%s" does not exist.', $class)); + } + + if (null !== $this->cache && false !== ($metadata = $this->cache->read($class))) { + // Include constraints from the parent class + $this->mergeConstraints($metadata); + + return $this->loadedClasses[$class] = $metadata; + } + + $metadata = new ClassMetadata($class); + + if (null !== $this->loader) { + $this->loader->loadClassMetadata($metadata); + } + + if (null !== $this->cache) { + $this->cache->write($metadata); + } + + // Include constraints from the parent class + $this->mergeConstraints($metadata); + + return $this->loadedClasses[$class] = $metadata; + } + + private function mergeConstraints(ClassMetadata $metadata) + { + // Include constraints from the parent class + if ($parent = $metadata->getReflectionClass()->getParentClass()) { + $metadata->mergeConstraints($this->getMetadataFor($parent->name)); + } + + $interfaces = $metadata->getReflectionClass()->getInterfaces(); + + $interfaces = array_filter($interfaces, function ($interface) use ($parent, $interfaces) { + $interfaceName = $interface->getName(); + + if ($parent && $parent->implementsInterface($interfaceName)) { + return false; + } + + foreach ($interfaces as $i) { + if ($i !== $interface && $i->implementsInterface($interfaceName)) { + return false; + } + } + + return true; + }); + + // Include constraints from all directly implemented interfaces + foreach ($interfaces as $interface) { + if ('Symfony\Component\Validator\GroupSequenceProviderInterface' === $interface->name) { + continue; + } + $metadata->mergeConstraints($this->getMetadataFor($interface->name)); + } + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($value) + { + if (!\is_object($value) && !\is_string($value)) { + return false; + } + + $class = ltrim(\is_object($value) ? \get_class($value) : $value, '\\'); + + return class_exists($class) || interface_exists($class, false); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php new file mode 100644 index 0000000..438ef98 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Factory; + +use Symfony\Component\Validator\MetadataFactoryInterface as LegacyMetadataFactoryInterface; + +/** + * Returns {@link \Symfony\Component\Validator\Mapping\MetadataInterface} instances for values. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface MetadataFactoryInterface extends LegacyMetadataFactoryInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/GenericMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/GenericMetadata.php new file mode 100644 index 0000000..2e4330f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/GenericMetadata.php @@ -0,0 +1,237 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Traverse; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Exception\BadMethodCallException; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\ValidationVisitorInterface; + +/** + * A generic container of {@link Constraint} objects. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class GenericMetadata implements MetadataInterface +{ + /** + * @var Constraint[] + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getConstraints()} and {@link findConstraints()} instead. + */ + public $constraints = array(); + + /** + * @var array + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link findConstraints()} instead. + */ + public $constraintsByGroup = array(); + + /** + * The strategy for cascading objects. + * + * By default, objects are not cascaded. + * + * @var int + * + * @see CascadingStrategy + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getCascadingStrategy()} instead. + */ + public $cascadingStrategy = CascadingStrategy::NONE; + + /** + * The strategy for traversing traversable objects. + * + * By default, traversable objects are not traversed. + * + * @var int + * + * @see TraversalStrategy + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getTraversalStrategy()} instead. + */ + public $traversalStrategy = TraversalStrategy::NONE; + + /** + * Returns the names of the properties that should be serialized. + * + * @return string[] + */ + public function __sleep() + { + return array( + 'constraints', + 'constraintsByGroup', + 'cascadingStrategy', + 'traversalStrategy', + ); + } + + /** + * Clones this object. + */ + public function __clone() + { + $constraints = $this->constraints; + + $this->constraints = array(); + $this->constraintsByGroup = array(); + + foreach ($constraints as $constraint) { + $this->addConstraint(clone $constraint); + } + } + + /** + * Adds a constraint. + * + * If the constraint {@link Valid} is added, the cascading strategy will be + * changed to {@link CascadingStrategy::CASCADE}. Depending on the + * properties $traverse and $deep of that constraint, the traversal strategy + * will be set to one of the following: + * + * - {@link TraversalStrategy::IMPLICIT} if $traverse is enabled and $deep + * is enabled + * - {@link TraversalStrategy::IMPLICIT} | {@link TraversalStrategy::STOP_RECURSION} + * if $traverse is enabled, but $deep is disabled + * - {@link TraversalStrategy::NONE} if $traverse is disabled + * + * @return $this + * + * @throws ConstraintDefinitionException When trying to add the + * {@link Traverse} constraint + */ + public function addConstraint(Constraint $constraint) + { + if ($constraint instanceof Traverse) { + throw new ConstraintDefinitionException(sprintf('The constraint "%s" can only be put on classes. Please use "Symfony\Component\Validator\Constraints\Valid" instead.', \get_class($constraint))); + } + + if ($constraint instanceof Valid) { + $this->cascadingStrategy = CascadingStrategy::CASCADE; + + if ($constraint->traverse) { + // Traverse unless the value is not traversable + $this->traversalStrategy = TraversalStrategy::IMPLICIT; + + if (!$constraint->deep) { + $this->traversalStrategy |= TraversalStrategy::STOP_RECURSION; + } + } else { + $this->traversalStrategy = TraversalStrategy::NONE; + } + + return $this; + } + + $this->constraints[] = $constraint; + + foreach ($constraint->groups as $group) { + $this->constraintsByGroup[$group][] = $constraint; + } + + return $this; + } + + /** + * Adds an list of constraints. + * + * @param Constraint[] $constraints The constraints to add + * + * @return $this + */ + public function addConstraints(array $constraints) + { + foreach ($constraints as $constraint) { + $this->addConstraint($constraint); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getConstraints() + { + return $this->constraints; + } + + /** + * Returns whether this element has any constraints. + * + * @return bool + */ + public function hasConstraints() + { + return \count($this->constraints) > 0; + } + + /** + * {@inheritdoc} + * + * Aware of the global group (* group). + */ + public function findConstraints($group) + { + return isset($this->constraintsByGroup[$group]) + ? $this->constraintsByGroup[$group] + : array(); + } + + /** + * {@inheritdoc} + */ + public function getCascadingStrategy() + { + return $this->cascadingStrategy; + } + + /** + * {@inheritdoc} + */ + public function getTraversalStrategy() + { + return $this->traversalStrategy; + } + + /** + * Exists for compatibility with the deprecated + * {@link Symfony\Component\Validator\MetadataInterface}. + * + * Should not be used. + * + * Implemented for backward compatibility with Symfony < 2.5. + * + * @throws BadMethodCallException + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath) + { + throw new BadMethodCallException('Not supported.'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/GetterMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/GetterMetadata.php new file mode 100644 index 0000000..5a72bd8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/GetterMetadata.php @@ -0,0 +1,80 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Exception\ValidatorException; + +/** + * Stores all metadata needed for validating a class property via its getter + * method. + * + * A property getter is any method that is equal to the property's name, + * prefixed with either "get" or "is". That method will be used to access the + * property's value. + * + * The getter will be invoked by reflection, so the access of private and + * protected getters is supported. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see PropertyMetadataInterface + */ +class GetterMetadata extends MemberMetadata +{ + /** + * @param string $class The class the getter is defined on + * @param string $property The property which the getter returns + * @param string|null $method The method that is called to retrieve the value being validated (null for auto-detection) + * + * @throws ValidatorException + */ + public function __construct($class, $property, $method = null) + { + if (null === $method) { + $getMethod = 'get'.ucfirst($property); + $isMethod = 'is'.ucfirst($property); + $hasMethod = 'has'.ucfirst($property); + + if (method_exists($class, $getMethod)) { + $method = $getMethod; + } elseif (method_exists($class, $isMethod)) { + $method = $isMethod; + } elseif (method_exists($class, $hasMethod)) { + $method = $hasMethod; + } else { + throw new ValidatorException(sprintf('Neither of these methods exist in class %s: %s, %s, %s', $class, $getMethod, $isMethod, $hasMethod)); + } + } elseif (!method_exists($class, $method)) { + throw new ValidatorException(sprintf('The %s() method does not exist in class %s.', $method, $class)); + } + + parent::__construct($class, $method, $property); + } + + /** + * {@inheritdoc} + */ + public function getPropertyValue($object) + { + return $this->newReflectionMember($object)->invoke($object); + } + + /** + * {@inheritdoc} + */ + protected function newReflectionMember($objectOrClassName) + { + return new \ReflectionMethod($objectOrClassName, $this->getName()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php new file mode 100644 index 0000000..9d92de3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php @@ -0,0 +1,88 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MappingException; + +/** + * Base loader for validation metadata. + * + * This loader supports the loading of constraints from Symfony's default + * namespace (see {@link DEFAULT_NAMESPACE}) using the short class names of + * those constraints. Constraints can also be loaded using their fully + * qualified class names. At last, namespace aliases can be defined to load + * constraints with the syntax "alias:ShortName". + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class AbstractLoader implements LoaderInterface +{ + /** + * The namespace to load constraints from by default. + */ + const DEFAULT_NAMESPACE = '\\Symfony\\Component\\Validator\\Constraints\\'; + + protected $namespaces = array(); + + /** + * Adds a namespace alias. + * + * The namespace alias can be used to reference constraints from specific + * namespaces in {@link newConstraint()}: + * + * $this->addNamespaceAlias('mynamespace', '\\Acme\\Package\\Constraints\\'); + * + * $constraint = $this->newConstraint('mynamespace:NotNull'); + * + * @param string $alias The alias + * @param string $namespace The PHP namespace + */ + protected function addNamespaceAlias($alias, $namespace) + { + $this->namespaces[$alias] = $namespace; + } + + /** + * Creates a new constraint instance for the given constraint name. + * + * @param string $name The constraint name. Either a constraint relative + * to the default constraint namespace, or a fully + * qualified class name. Alternatively, the constraint + * may be preceded by a namespace alias and a colon. + * The namespace alias must have been defined using + * {@link addNamespaceAlias()}. + * @param mixed $options The constraint options + * + * @return Constraint + * + * @throws MappingException If the namespace prefix is undefined + */ + protected function newConstraint($name, $options = null) + { + if (false !== strpos($name, '\\') && class_exists($name)) { + $className = (string) $name; + } elseif (false !== strpos($name, ':')) { + list($prefix, $className) = explode(':', $name, 2); + + if (!isset($this->namespaces[$prefix])) { + throw new MappingException(sprintf('Undefined namespace prefix "%s"', $prefix)); + } + + $className = $this->namespaces[$prefix].$className; + } else { + $className = self::DEFAULT_NAMESPACE.$name; + } + + return new $className($options); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php new file mode 100644 index 0000000..c2d1bdf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php @@ -0,0 +1,92 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Doctrine\Common\Annotations\Reader; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\GroupSequenceProvider; +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata using a Doctrine annotation {@link Reader}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class AnnotationLoader implements LoaderInterface +{ + protected $reader; + + public function __construct(Reader $reader) + { + $this->reader = $reader; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + $reflClass = $metadata->getReflectionClass(); + $className = $reflClass->name; + $success = false; + + foreach ($this->reader->getClassAnnotations($reflClass) as $constraint) { + if ($constraint instanceof GroupSequence) { + $metadata->setGroupSequence($constraint->groups); + } elseif ($constraint instanceof GroupSequenceProvider) { + $metadata->setGroupSequenceProvider(true); + } elseif ($constraint instanceof Constraint) { + $metadata->addConstraint($constraint); + } + + $success = true; + } + + foreach ($reflClass->getProperties() as $property) { + if ($property->getDeclaringClass()->name === $className) { + foreach ($this->reader->getPropertyAnnotations($property) as $constraint) { + if ($constraint instanceof Constraint) { + $metadata->addPropertyConstraint($property->name, $constraint); + } + + $success = true; + } + } + } + + foreach ($reflClass->getMethods() as $method) { + if ($method->getDeclaringClass()->name === $className) { + foreach ($this->reader->getMethodAnnotations($method) as $constraint) { + if ($constraint instanceof Callback) { + $constraint->callback = $method->getName(); + $constraint->methods = null; + + $metadata->addConstraint($constraint); + } elseif ($constraint instanceof Constraint) { + if (preg_match('/^(get|is|has)(.+)$/i', $method->name, $matches)) { + $metadata->addGetterMethodConstraint(lcfirst($matches[2]), $matches[0], $constraint); + } else { + throw new MappingException(sprintf('The constraint on "%s::%s" cannot be added. Constraints can only be added on methods beginning with "get", "is" or "has".', $className, $method->name)); + } + } + + $success = true; + } + } + } + + return $success; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/FileLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/FileLoader.php new file mode 100644 index 0000000..b8f9490 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/FileLoader.php @@ -0,0 +1,51 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Exception\MappingException; + +/** + * Base loader for loading validation metadata from a file. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see YamlFileLoader + * @see XmlFileLoader + */ +abstract class FileLoader extends AbstractLoader +{ + protected $file; + + /** + * Creates a new loader. + * + * @param string $file The mapping file to load + * + * @throws MappingException If the file does not exist or is not readable + */ + public function __construct($file) + { + if (!is_file($file)) { + throw new MappingException(sprintf('The mapping file "%s" does not exist', $file)); + } + + if (!is_readable($file)) { + throw new MappingException(sprintf('The mapping file "%s" is not readable', $file)); + } + + if (!stream_is_local($this->file)) { + throw new MappingException(sprintf('The mapping file "%s" is not a local file', $file)); + } + + $this->file = $file; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/FilesLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/FilesLoader.php new file mode 100644 index 0000000..571c7e7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/FilesLoader.php @@ -0,0 +1,61 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +/** + * Base loader for loading validation metadata from a list of files. + * + * @author Bulat Shakirzyanov <mallluhuct@gmail.com> + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see YamlFilesLoader + * @see XmlFilesLoader + */ +abstract class FilesLoader extends LoaderChain +{ + /** + * Creates a new loader. + * + * @param array $paths An array of file paths + */ + public function __construct(array $paths) + { + parent::__construct($this->getFileLoaders($paths)); + } + + /** + * Returns an array of file loaders for the given file paths. + * + * @param array $paths An array of file paths + * + * @return LoaderInterface[] The metadata loaders + */ + protected function getFileLoaders($paths) + { + $loaders = array(); + + foreach ($paths as $path) { + $loaders[] = $this->getFileLoaderInstance($path); + } + + return $loaders; + } + + /** + * Creates a loader for the given file path. + * + * @param string $path The file path + * + * @return LoaderInterface The created loader + */ + abstract protected function getFileLoaderInstance($path); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderChain.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderChain.php new file mode 100644 index 0000000..2c5108f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderChain.php @@ -0,0 +1,59 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata from multiple {@link LoaderInterface} instances. + * + * Pass the loaders when constructing the chain. Once + * {@link loadClassMetadata()} is called, that method will be called on all + * loaders in the chain. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class LoaderChain implements LoaderInterface +{ + protected $loaders; + + /** + * @param LoaderInterface[] $loaders The metadata loaders to use + * + * @throws MappingException If any of the loaders has an invalid type + */ + public function __construct(array $loaders) + { + foreach ($loaders as $loader) { + if (!$loader instanceof LoaderInterface) { + throw new MappingException(sprintf('Class %s is expected to implement LoaderInterface', \get_class($loader))); + } + } + + $this->loaders = $loaders; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + $success = false; + + foreach ($this->loaders as $loader) { + $success = $loader->loadClassMetadata($metadata) || $success; + } + + return $success; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php new file mode 100644 index 0000000..d988309 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata into {@link ClassMetadata} instances. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface LoaderInterface +{ + /** + * Loads validation metadata into a {@link ClassMetadata} instance. + * + * @return bool Whether the loader succeeded + */ + public function loadClassMetadata(ClassMetadata $metadata); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php new file mode 100644 index 0000000..95fc578 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php @@ -0,0 +1,66 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata by calling a static method on the loaded class. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class StaticMethodLoader implements LoaderInterface +{ + protected $methodName; + + /** + * Creates a new loader. + * + * @param string $methodName The name of the static method to call + */ + public function __construct($methodName = 'loadValidatorMetadata') + { + $this->methodName = $methodName; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + /** @var \ReflectionClass $reflClass */ + $reflClass = $metadata->getReflectionClass(); + + if (!$reflClass->isInterface() && $reflClass->hasMethod($this->methodName)) { + $reflMethod = $reflClass->getMethod($this->methodName); + + if ($reflMethod->isAbstract()) { + return false; + } + + if (!$reflMethod->isStatic()) { + throw new MappingException(sprintf('The method %s::%s should be static', $reflClass->name, $this->methodName)); + } + + if ($reflMethod->getDeclaringClass()->name != $reflClass->name) { + return false; + } + + $reflMethod->invoke(null, $metadata); + + return true; + } + + return false; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php new file mode 100644 index 0000000..0c6c19b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php @@ -0,0 +1,213 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata from an XML file. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class XmlFileLoader extends FileLoader +{ + /** + * The XML nodes of the mapping file. + * + * @var \SimpleXMLElement[]|null + */ + protected $classes; + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + if (null === $this->classes) { + // This method may throw an exception. Do not modify the class' + // state before it completes + $xml = $this->parseFile($this->file); + + $this->classes = array(); + + foreach ($xml->namespace as $namespace) { + $this->addNamespaceAlias((string) $namespace['prefix'], trim((string) $namespace)); + } + + foreach ($xml->class as $class) { + $this->classes[(string) $class['name']] = $class; + } + } + + if (isset($this->classes[$metadata->getClassName()])) { + $classDescription = $this->classes[$metadata->getClassName()]; + + $this->loadClassMetadataFromXml($metadata, $classDescription); + + return true; + } + + return false; + } + + /** + * Parses a collection of "constraint" XML nodes. + * + * @param \SimpleXMLElement $nodes The XML nodes + * + * @return array The Constraint instances + */ + protected function parseConstraints(\SimpleXMLElement $nodes) + { + $constraints = array(); + + foreach ($nodes as $node) { + if (\count($node) > 0) { + if (\count($node->value) > 0) { + $options = $this->parseValues($node->value); + } elseif (\count($node->constraint) > 0) { + $options = $this->parseConstraints($node->constraint); + } elseif (\count($node->option) > 0) { + $options = $this->parseOptions($node->option); + } else { + $options = array(); + } + } elseif (\strlen((string) $node) > 0) { + $options = XmlUtils::phpize(trim($node)); + } else { + $options = null; + } + + $constraints[] = $this->newConstraint((string) $node['name'], $options); + } + + return $constraints; + } + + /** + * Parses a collection of "value" XML nodes. + * + * @param \SimpleXMLElement $nodes The XML nodes + * + * @return array The values + */ + protected function parseValues(\SimpleXMLElement $nodes) + { + $values = array(); + + foreach ($nodes as $node) { + if (\count($node) > 0) { + if (\count($node->value) > 0) { + $value = $this->parseValues($node->value); + } elseif (\count($node->constraint) > 0) { + $value = $this->parseConstraints($node->constraint); + } else { + $value = array(); + } + } else { + $value = trim($node); + } + + if (isset($node['key'])) { + $values[(string) $node['key']] = $value; + } else { + $values[] = $value; + } + } + + return $values; + } + + /** + * Parses a collection of "option" XML nodes. + * + * @param \SimpleXMLElement $nodes The XML nodes + * + * @return array The options + */ + protected function parseOptions(\SimpleXMLElement $nodes) + { + $options = array(); + + foreach ($nodes as $node) { + if (\count($node) > 0) { + if (\count($node->value) > 0) { + $value = $this->parseValues($node->value); + } elseif (\count($node->constraint) > 0) { + $value = $this->parseConstraints($node->constraint); + } else { + $value = array(); + } + } else { + $value = XmlUtils::phpize($node); + if (\is_string($value)) { + $value = trim($value); + } + } + + $options[(string) $node['name']] = $value; + } + + return $options; + } + + /** + * Loads the XML class descriptions from the given file. + * + * @param string $path The path of the XML file + * + * @return \SimpleXMLElement The class descriptions + * + * @throws MappingException If the file could not be loaded + */ + protected function parseFile($path) + { + try { + $dom = XmlUtils::loadFile($path, __DIR__.'/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd'); + } catch (\Exception $e) { + throw new MappingException($e->getMessage(), $e->getCode(), $e); + } + + return simplexml_import_dom($dom); + } + + private function loadClassMetadataFromXml(ClassMetadata $metadata, \SimpleXMLElement $classDescription) + { + if (\count($classDescription->{'group-sequence-provider'}) > 0) { + $metadata->setGroupSequenceProvider(true); + } + + foreach ($classDescription->{'group-sequence'} as $groupSequence) { + if (\count($groupSequence->value) > 0) { + $metadata->setGroupSequence($this->parseValues($groupSequence[0]->value)); + } + } + + foreach ($this->parseConstraints($classDescription->constraint) as $constraint) { + $metadata->addConstraint($constraint); + } + + foreach ($classDescription->property as $property) { + foreach ($this->parseConstraints($property->constraint) as $constraint) { + $metadata->addPropertyConstraint((string) $property['name'], $constraint); + } + } + + foreach ($classDescription->getter as $getter) { + foreach ($this->parseConstraints($getter->constraint) as $constraint) { + $metadata->addGetterConstraint((string) $getter['property'], $constraint); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php new file mode 100644 index 0000000..6017c3f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +/** + * Loads validation metadata from a list of XML files. + * + * @author Bulat Shakirzyanov <mallluhuct@gmail.com> + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see FilesLoader + */ +class XmlFilesLoader extends FilesLoader +{ + /** + * {@inheritdoc} + */ + public function getFileLoaderInstance($file) + { + return new XmlFileLoader($file); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php new file mode 100644 index 0000000..d1ec7f0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php @@ -0,0 +1,178 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Parser as YamlParser; + +/** + * Loads validation metadata from a YAML file. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class YamlFileLoader extends FileLoader +{ + /** + * An array of YAML class descriptions. + * + * @var array + */ + protected $classes = null; + + /** + * Caches the used YAML parser. + * + * @var YamlParser + */ + private $yamlParser; + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + if (null === $this->classes) { + if (null === $this->yamlParser) { + $this->yamlParser = new YamlParser(); + } + + $this->classes = $this->parseFile($this->file); + + if (isset($this->classes['namespaces'])) { + foreach ($this->classes['namespaces'] as $alias => $namespace) { + $this->addNamespaceAlias($alias, $namespace); + } + + unset($this->classes['namespaces']); + } + } + + if (isset($this->classes[$metadata->getClassName()])) { + $classDescription = $this->classes[$metadata->getClassName()]; + + $this->loadClassMetadataFromYaml($metadata, $classDescription); + + return true; + } + + return false; + } + + /** + * Parses a collection of YAML nodes. + * + * @param array $nodes The YAML nodes + * + * @return array An array of values or Constraint instances + */ + protected function parseNodes(array $nodes) + { + $values = array(); + + foreach ($nodes as $name => $childNodes) { + if (is_numeric($name) && \is_array($childNodes) && 1 === \count($childNodes)) { + $options = current($childNodes); + + if (\is_array($options)) { + $options = $this->parseNodes($options); + } + + $values[] = $this->newConstraint(key($childNodes), $options); + } else { + if (\is_array($childNodes)) { + $childNodes = $this->parseNodes($childNodes); + } + + $values[$name] = $childNodes; + } + } + + return $values; + } + + /** + * Loads the YAML class descriptions from the given file. + * + * @param string $path The path of the YAML file + * + * @return array The class descriptions + * + * @throws \InvalidArgumentException If the file could not be loaded or did + * not contain a YAML array + */ + private function parseFile($path) + { + try { + $classes = $this->yamlParser->parse(file_get_contents($path)); + } catch (ParseException $e) { + throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e); + } + + // empty file + if (null === $classes) { + return array(); + } + + // not an array + if (!\is_array($classes)) { + throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $this->file)); + } + + return $classes; + } + + /** + * Loads the validation metadata from the given YAML class description. + * + * @param ClassMetadata $metadata The metadata to load + * @param array $classDescription The YAML class description + */ + private function loadClassMetadataFromYaml(ClassMetadata $metadata, array $classDescription) + { + if (isset($classDescription['group_sequence_provider'])) { + $metadata->setGroupSequenceProvider( + (bool) $classDescription['group_sequence_provider'] + ); + } + + if (isset($classDescription['group_sequence'])) { + $metadata->setGroupSequence($classDescription['group_sequence']); + } + + if (isset($classDescription['constraints']) && \is_array($classDescription['constraints'])) { + foreach ($this->parseNodes($classDescription['constraints']) as $constraint) { + $metadata->addConstraint($constraint); + } + } + + if (isset($classDescription['properties']) && \is_array($classDescription['properties'])) { + foreach ($classDescription['properties'] as $property => $constraints) { + if (null !== $constraints) { + foreach ($this->parseNodes($constraints) as $constraint) { + $metadata->addPropertyConstraint($property, $constraint); + } + } + } + } + + if (isset($classDescription['getters']) && \is_array($classDescription['getters'])) { + foreach ($classDescription['getters'] as $getter => $constraints) { + if (null !== $constraints) { + foreach ($this->parseNodes($constraints) as $constraint) { + $metadata->addGetterConstraint($getter, $constraint); + } + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php new file mode 100644 index 0000000..235856f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +/** + * Loads validation metadata from a list of YAML files. + * + * @author Bulat Shakirzyanov <mallluhuct@gmail.com> + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see FilesLoader + */ +class YamlFilesLoader extends FilesLoader +{ + /** + * {@inheritdoc} + */ + public function getFileLoaderInstance($file) + { + return new YamlFileLoader($file); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd b/public/system/storage/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd new file mode 100644 index 0000000..1ca840b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd @@ -0,0 +1,160 @@ +<?xml version="1.0" ?> + +<xsd:schema xmlns="http://symfony.com/schema/dic/constraint-mapping" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://symfony.com/schema/dic/constraint-mapping" + elementFormDefault="qualified"> + + <xsd:annotation> + <xsd:documentation><![CDATA[ + Symfony Validator Constraint Mapping Schema, version 1.0 + Authors: Bernhard Schussek + + A constraint mapping connects classes, properties and getters with + validation constraints. + ]]></xsd:documentation> + </xsd:annotation> + + <xsd:element name="constraint-mapping" type="constraint-mapping" /> + + <xsd:complexType name="constraint-mapping"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + The root element of the constraint mapping definition. + ]]></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="namespace" type="namespace" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="class" type="class" maxOccurs="unbounded" /> + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="namespace"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + Contains the abbreviation for a namespace. + ]]></xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="prefix" type="xsd:string" use="required" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + <xsd:complexType name="class"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + Contains constraints for a single class. + + Nested elements may be class constraints, property and/or getter + definitions. + ]]></xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="group-sequence-provider" type="group-sequence-provider" minOccurs="0" maxOccurs="1" /> + <xsd:element name="group-sequence" type="group-sequence" minOccurs="0" maxOccurs="1" /> + <xsd:element name="constraint" type="constraint" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="getter" type="getter" minOccurs="0" maxOccurs="unbounded" /> + </xsd:choice> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + + <xsd:complexType name="group-sequence"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + Contains the group sequence of a class. Each group should be written + into a "value" tag. + ]]></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="value" type="value" minOccurs="1" maxOccurs="unbounded" /> + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="group-sequence-provider"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + Defines the name of the group sequence provider for a class. + ]]></xsd:documentation> + </xsd:annotation> + </xsd:complexType> + + <xsd:complexType name="property"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + Contains constraints for a single property. The name of the property + should be given in the "name" option. + ]]></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="constraint" type="constraint" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + + <xsd:complexType name="getter"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + Contains constraints for a getter method. The name of the corresponding + property should be given in the "property" option. + ]]></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="constraint" type="constraint" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="property" type="xsd:string" use="required" /> + </xsd:complexType> + + <xsd:complexType name="constraint" mixed="true"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + Contains a constraint definition. The name of the constraint should be + given in the "name" option. + + May contain a single value, multiple "constraint" elements, + multiple "value" elements or multiple "option" elements. + ]]></xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0"> + <xsd:element name="constraint" type="constraint" minOccurs="1" maxOccurs="unbounded" /> + <xsd:element name="option" type="option" minOccurs="1" maxOccurs="unbounded" /> + <xsd:element name="value" type="value" minOccurs="1" maxOccurs="unbounded" /> + </xsd:choice> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + + <xsd:complexType name="option" mixed="true"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + Contains a constraint option definition. The name of the option + should be given in the "name" option. + + May contain a single value, multiple "value" elements or multiple + "constraint" elements. + ]]></xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0"> + <xsd:element name="constraint" type="constraint" minOccurs="1" maxOccurs="unbounded" /> + <xsd:element name="value" type="value" minOccurs="1" maxOccurs="unbounded" /> + </xsd:choice> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + + <xsd:complexType name="value" mixed="true"> + <xsd:annotation> + <xsd:documentation><![CDATA[ + A value of an element. + + May contain a single value, multiple "value" elements or multiple + "constraint" elements. + ]]></xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0"> + <xsd:element name="constraint" type="constraint" minOccurs="1" maxOccurs="unbounded" /> + <xsd:element name="value" type="value" minOccurs="1" maxOccurs="unbounded" /> + </xsd:choice> + <xsd:attribute name="key" type="xsd:string" use="optional" /> + </xsd:complexType> +</xsd:schema> diff --git a/public/system/storage/vendor/symfony/validator/Mapping/MemberMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/MemberMetadata.php new file mode 100644 index 0000000..565f2f4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/MemberMetadata.php @@ -0,0 +1,248 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\ValidationVisitorInterface; + +/** + * Stores all metadata needed for validating a class property. + * + * The method of accessing the property's value must be specified by subclasses + * by implementing the {@link newReflectionMember()} method. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see PropertyMetadataInterface + */ +abstract class MemberMetadata extends ElementMetadata implements PropertyMetadataInterface +{ + /** + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getClassName()} instead. + */ + public $class; + + /** + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getName()} instead. + */ + public $name; + + /** + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getPropertyName()} instead. + */ + public $property; + + /** + * @var \ReflectionMethod[]|\ReflectionProperty[] + */ + private $reflMember = array(); + + /** + * @param string $class The name of the class this member is defined on + * @param string $name The name of the member + * @param string $property The property the member belongs to + */ + public function __construct($class, $name, $property) + { + $this->class = $class; + $this->name = $name; + $this->property = $property; + } + + /** + * {@inheritdoc} + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + $visitor->visit($this, $value, $group, $propertyPath); + + if ($this->isCascaded()) { + $visitor->validate($value, $propagatedGroup ?: $group, $propertyPath, $this->isCollectionCascaded(), $this->isCollectionCascadedDeeply()); + } + } + + /** + * {@inheritdoc} + */ + public function addConstraint(Constraint $constraint) + { + if (!\in_array(Constraint::PROPERTY_CONSTRAINT, (array) $constraint->getTargets())) { + throw new ConstraintDefinitionException(sprintf('The constraint %s cannot be put on properties or getters', \get_class($constraint))); + } + + parent::addConstraint($constraint); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function __sleep() + { + return array_merge(parent::__sleep(), array( + 'class', + 'name', + 'property', + )); + } + + /** + * Returns the name of the member. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function getClassName() + { + return $this->class; + } + + /** + * {@inheritdoc} + */ + public function getPropertyName() + { + return $this->property; + } + + /** + * Returns whether this member is public. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return bool + */ + public function isPublic($objectOrClassName) + { + return $this->getReflectionMember($objectOrClassName)->isPublic(); + } + + /** + * Returns whether this member is protected. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return bool + */ + public function isProtected($objectOrClassName) + { + return $this->getReflectionMember($objectOrClassName)->isProtected(); + } + + /** + * Returns whether this member is private. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return bool + */ + public function isPrivate($objectOrClassName) + { + return $this->getReflectionMember($objectOrClassName)->isPrivate(); + } + + /** + * Returns whether objects stored in this member should be validated. + * + * @return bool + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link getCascadingStrategy()} instead. + */ + public function isCascaded() + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the getCascadingStrategy() method instead.', E_USER_DEPRECATED); + + return (bool) ($this->cascadingStrategy & CascadingStrategy::CASCADE); + } + + /** + * Returns whether arrays or traversable objects stored in this member + * should be traversed and validated in each entry. + * + * @return bool + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link getTraversalStrategy()} instead. + */ + public function isCollectionCascaded() + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); + + return (bool) ($this->traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE)); + } + + /** + * Returns whether arrays or traversable objects stored in this member + * should be traversed recursively for inner arrays/traversable objects. + * + * @return bool + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link getTraversalStrategy()} instead. + */ + public function isCollectionCascadedDeeply() + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); + + return !($this->traversalStrategy & TraversalStrategy::STOP_RECURSION); + } + + /** + * Returns the reflection instance for accessing the member's value. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return \ReflectionMethod|\ReflectionProperty The reflection instance + */ + public function getReflectionMember($objectOrClassName) + { + $className = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); + if (!isset($this->reflMember[$className])) { + $this->reflMember[$className] = $this->newReflectionMember($objectOrClassName); + } + + return $this->reflMember[$className]; + } + + /** + * Creates a new reflection instance for accessing the member's value. + * + * Must be implemented by subclasses. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return \ReflectionMethod|\ReflectionProperty The reflection instance + */ + abstract protected function newReflectionMember($objectOrClassName); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/MetadataInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/MetadataInterface.php new file mode 100644 index 0000000..1e9d3c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/MetadataInterface.php @@ -0,0 +1,58 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\MetadataInterface as LegacyMetadataInterface; + +/** + * A container for validation metadata. + * + * Most importantly, the metadata stores the constraints against which an object + * and its properties should be validated. + * + * Additionally, the metadata stores whether objects should be validated + * against their class' metadata and whether traversable objects should be + * traversed or not. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see CascadingStrategy + * @see TraversalStrategy + */ +interface MetadataInterface extends LegacyMetadataInterface +{ + /** + * Returns the strategy for cascading objects. + * + * @return int The cascading strategy + * + * @see CascadingStrategy + */ + public function getCascadingStrategy(); + + /** + * Returns the strategy for traversing traversable objects. + * + * @return int The traversal strategy + * + * @see TraversalStrategy + */ + public function getTraversalStrategy(); + + /** + * Returns all constraints of this element. + * + * @return Constraint[] A list of Constraint instances + */ + public function getConstraints(); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadata.php new file mode 100644 index 0000000..b03a059 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadata.php @@ -0,0 +1,74 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Exception\ValidatorException; + +/** + * Stores all metadata needed for validating a class property. + * + * The value of the property is obtained by directly accessing the property. + * The property will be accessed by reflection, so the access of private and + * protected properties is supported. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see PropertyMetadataInterface + */ +class PropertyMetadata extends MemberMetadata +{ + /** + * @param string $class The class this property is defined on + * @param string $name The name of this property + * + * @throws ValidatorException + */ + public function __construct($class, $name) + { + if (!property_exists($class, $name)) { + throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s"', $name, $class)); + } + + parent::__construct($class, $name, $name); + } + + /** + * {@inheritdoc} + */ + public function getPropertyValue($object) + { + return $this->getReflectionMember($object)->getValue($object); + } + + /** + * {@inheritdoc} + */ + protected function newReflectionMember($objectOrClassName) + { + $originalClass = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); + + while (!property_exists($objectOrClassName, $this->getName())) { + $objectOrClassName = get_parent_class($objectOrClassName); + + if (false === $objectOrClassName) { + throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s".', $this->getName(), $originalClass)); + } + } + + $member = new \ReflectionProperty($objectOrClassName, $this->getName()); + $member->setAccessible(true); + + return $member; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php new file mode 100644 index 0000000..d7a4114 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php @@ -0,0 +1,35 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\ClassBasedInterface; +use Symfony\Component\Validator\PropertyMetadataInterface as LegacyPropertyMetadataInterface; + +/** + * Stores all metadata needed for validating the value of a class property. + * + * Most importantly, the metadata stores the constraints against which the + * property's value should be validated. + * + * Additionally, the metadata stores whether objects stored in the property + * should be validated against their class' metadata and whether traversable + * objects should be traversed or not. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see MetadataInterface + * @see CascadingStrategy + * @see TraversalStrategy + */ +interface PropertyMetadataInterface extends MetadataInterface, LegacyPropertyMetadataInterface, ClassBasedInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/TraversalStrategy.php b/public/system/storage/vendor/symfony/validator/Mapping/TraversalStrategy.php new file mode 100644 index 0000000..164992b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/TraversalStrategy.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +/** + * Specifies whether and how a traversable object should be traversed. + * + * If the node traverser traverses a node whose value is an instance of + * {@link \Traversable}, and if that node is either a class node or if + * cascading is enabled, then the node's traversal strategy will be checked. + * Depending on the requested traversal strategy, the node traverser will + * iterate over the object and cascade each object or collection returned by + * the iterator. + * + * The traversal strategy is ignored for arrays. Arrays are always iterated. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see CascadingStrategy + */ +class TraversalStrategy +{ + /** + * Specifies that a node's value should be iterated only if it is an + * instance of {@link \Traversable}. + */ + const IMPLICIT = 1; + + /** + * Specifies that a node's value should never be iterated. + */ + const NONE = 2; + + /** + * Specifies that a node's value should always be iterated. If the value is + * not an instance of {@link \Traversable}, an exception should be thrown. + */ + const TRAVERSE = 4; + + /** + * Specifies that nested instances of {@link \Traversable} should never be + * iterated. Can be combined with {@link IMPLICIT} or {@link TRAVERSE}. + * + * @deprecated since version 2.5, to be removed in 3.0. This constant was added for backwards compatibility only. + * + * @internal + */ + const STOP_RECURSION = 8; + + /** + * Not instantiable. + */ + private function __construct() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/MetadataFactoryInterface.php b/public/system/storage/vendor/symfony/validator/MetadataFactoryInterface.php new file mode 100644 index 0000000..555bea9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/MetadataFactoryInterface.php @@ -0,0 +1,43 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Returns {@link MetadataInterface} instances for values. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Mapping\Factory\MetadataFactoryInterface} instead. + */ +interface MetadataFactoryInterface +{ + /** + * Returns the metadata for the given value. + * + * @param mixed $value Some value + * + * @return MetadataInterface The metadata for the value + * + * @throws Exception\NoSuchMetadataException If no metadata exists for the given value + */ + public function getMetadataFor($value); + + /** + * Returns whether the class is able to return metadata for the given value. + * + * @param mixed $value Some value + * + * @return bool Whether metadata can be returned for that value + */ + public function hasMetadataFor($value); +} diff --git a/public/system/storage/vendor/symfony/validator/MetadataInterface.php b/public/system/storage/vendor/symfony/validator/MetadataInterface.php new file mode 100644 index 0000000..2c89449 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/MetadataInterface.php @@ -0,0 +1,73 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * A container for validation metadata. + * + * The container contains constraints that may belong to different validation + * groups. Constraints for a specific group can be fetched by calling + * {@link findConstraints}. + * + * Implement this interface to add validation metadata to your own metadata + * layer. Each metadata may have named properties. Each property can be + * represented by one or more {@link PropertyMetadataInterface} instances that + * are returned by {@link getPropertyMetadata}. Since + * <tt>PropertyMetadataInterface</tt> inherits from <tt>MetadataInterface</tt>, + * each property may be divided into further properties. + * + * The {@link accept} method of each metadata implements the Visitor pattern. + * The method should forward the call to the visitor's + * {@link ValidationVisitorInterface::visit} method and additionally call + * <tt>accept()</tt> on all structurally related metadata instances. + * + * For example, to store constraints for PHP classes and their properties, + * create a class <tt>ClassMetadata</tt> (implementing <tt>MetadataInterface</tt>) + * and a class <tt>PropertyMetadata</tt> (implementing <tt>PropertyMetadataInterface</tt>). + * <tt>ClassMetadata::getPropertyMetadata($property)</tt> returns all + * <tt>PropertyMetadata</tt> instances for a property of that class. Its + * <tt>accept()</tt>-method simply forwards to <tt>ValidationVisitorInterface::visit()</tt> + * and calls <tt>accept()</tt> on all contained <tt>PropertyMetadata</tt> + * instances, which themselves call <tt>ValidationVisitorInterface::visit()</tt> + * again. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Mapping\MetadataInterface} instead. + */ +interface MetadataInterface +{ + /** + * Implementation of the Visitor design pattern. + * + * Calls {@link ValidationVisitorInterface::visit} and then forwards the + * <tt>accept()</tt>-call to all property metadata instances. + * + * @param ValidationVisitorInterface $visitor The visitor implementing the validation logic + * @param mixed $value The value to validate + * @param string|string[] $group The validation group to validate in + * @param string $propertyPath The current property path in the validation graph + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath); + + /** + * Returns all constraints for a given validation group. + * + * @param string $group The validation group + * + * @return Constraint[] A list of constraint instances + */ + public function findConstraints($group); +} diff --git a/public/system/storage/vendor/symfony/validator/ObjectInitializerInterface.php b/public/system/storage/vendor/symfony/validator/ObjectInitializerInterface.php new file mode 100644 index 0000000..5f9cdad --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ObjectInitializerInterface.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Prepares an object for validation. + * + * Concrete implementations of this interface are used by {@link ValidationVisitorInterface} + * and {@link Validator\ContextualValidatorInterface} to initialize objects just before validating them. + * + * @author Fabien Potencier <fabien@symfony.com> + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ObjectInitializerInterface +{ + /** + * Initializes an object just before validation. + * + * @param object $object The object to validate + */ + public function initialize($object); +} diff --git a/public/system/storage/vendor/symfony/validator/PropertyMetadataContainerInterface.php b/public/system/storage/vendor/symfony/validator/PropertyMetadataContainerInterface.php new file mode 100644 index 0000000..b5c9cf4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/PropertyMetadataContainerInterface.php @@ -0,0 +1,45 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * A container for {@link PropertyMetadataInterface} instances. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Mapping\ClassMetadataInterface} instead. + */ +interface PropertyMetadataContainerInterface +{ + /** + * Check if there's any metadata attached to the given named property. + * + * @param string $property The property name + * + * @return bool + */ + public function hasPropertyMetadata($property); + + /** + * Returns all metadata instances for the given named property. + * + * If your implementation does not support properties, simply throw an + * exception in this method (for example a <tt>BadMethodCallException</tt>). + * + * @param string $property The property name + * + * @return PropertyMetadataInterface[] A list of metadata instances. Empty if + * no metadata exists for the property. + */ + public function getPropertyMetadata($property); +} diff --git a/public/system/storage/vendor/symfony/validator/PropertyMetadataInterface.php b/public/system/storage/vendor/symfony/validator/PropertyMetadataInterface.php new file mode 100644 index 0000000..64ae881 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/PropertyMetadataInterface.php @@ -0,0 +1,46 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * A container for validation metadata of a property. + * + * What exactly you define as "property" is up to you. The validator expects + * implementations of {@link MetadataInterface} that contain constraints and + * optionally a list of named properties that also have constraints (and may + * have further sub properties). Such properties are mapped by implementations + * of this interface. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see MetadataInterface + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Mapping\PropertyMetadataInterface} instead. + */ +interface PropertyMetadataInterface extends MetadataInterface +{ + /** + * Returns the name of the property. + * + * @return string The property name + */ + public function getPropertyName(); + + /** + * Extracts the value of the property from the given container. + * + * @param mixed $containingValue The container to extract the property value from + * + * @return mixed The value of the property + */ + public function getPropertyValue($containingValue); +} diff --git a/public/system/storage/vendor/symfony/validator/README.md b/public/system/storage/vendor/symfony/validator/README.md new file mode 100644 index 0000000..3ccb290 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/README.md @@ -0,0 +1,16 @@ +Validator Component +=================== + +The Validator component provides tools to validate values following the +[JSR-303 Bean Validation specification][1]. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/validator.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) + +[1]: http://jcp.org/en/jsr/detail?id=303 diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.af.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.af.xlf new file mode 100644 index 0000000..177bb00 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.af.xlf @@ -0,0 +1,227 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Hierdie waarde moet vals wees.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Hierdie waarde moet waar wees.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Hierdie waarde moet van die soort {{type}} wees.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Hierdie waarde moet leeg wees.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Die waarde wat jy gekies het is nie 'n geldige keuse nie.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Jy moet ten minste {{ limit }} kies.|Jy moet ten minste {{ limit }} keuses kies.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Jy moet by die meeste {{ limit }} keuse kies.|Jy moet by die meeste {{ limit }} keuses kies.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Een of meer van die gegewe waardes is ongeldig.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Die veld is nie verwag nie.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Hierdie veld ontbreek.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Hierdie waarde is nie 'n geldige datum nie.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Hierdie waarde is nie 'n geldige datum en tyd nie.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Hierdie waarde is nie 'n geldige e-pos adres nie.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Die lêer kon nie gevind word nie.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Die lêer kan nie gelees word nie.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Die lêer is te groot ({{ size }} {{ suffix }}). Toegelaat maksimum grootte is {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Die MIME-tipe van die lêer is ongeldig ({{ type }}). Toegelaat MIME-tipes is {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Hierdie waarde moet {{ limit }} of minder wees.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Hierdie waarde is te lank. Dit moet {{ limit }} karakter of minder wees.|Hierdie waarde is te lank. Dit moet {{ limit }} karakters of minder wees.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Hierdie waarde moet {{ limit }} of meer wees.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Hierdie waarde is te kort. Dit moet {{ limit }} karakter of meer wees.|Hierdie waarde is te kort. Dit moet {{ limit }} karakters of meer wees.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Hierdie waarde moet nie leeg wees nie.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Hierdie waarde moet nie nul wees nie.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Hierdie waarde moet nul wees.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Hierdie waarde is nie geldig nie.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Hierdie waarde is nie 'n geldige tyd nie.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Hierdie waarde is nie 'n geldige URL nie.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Die twee waardes moet gelyk wees.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Die lêer is te groot. Toegelaat maksimum grootte is {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Die lêer is te groot.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Die lêer kan nie opgelaai word nie.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Hierdie waarde moet 'n geldige nommer wees.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Hierdie lêer is nie 'n geldige beeld nie.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Hierdie is nie 'n geldige IP-adres nie.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Hierdie waarde is nie 'n geldige taal nie.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Hierdie waarde is nie 'n geldige land instelling nie.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Hierdie waarde is nie 'n geldige land nie.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Hierdie waarde word reeds gebruik.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Die grootte van die beeld kon nie opgespoor word nie.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Die beeld breedte is te groot ({{ width }}px). Toegelaat maksimum breedte is {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Die beeld breedte is te klein ({{ width }}px). Minimum breedte verwag is {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Die beeld hoogte is te groot ({{ height }}px). Toegelaat maksimum hoogte is {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Die beeld hoogte is te klein ({{ height }}px). Minimum hoogte verwag is {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Hierdie waarde moet die huidige wagwoord van die gebruiker wees.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Hierdie waarde moet presies {{ limit }} karakter wees.|Hierdie waarde moet presies {{ limit }} karakters wees.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Die lêer is slegs gedeeltelik opgelaai.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Geen lêer is opgelaai nie.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Geen tydelike lêer is ingestel in php.ini nie.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Kan nie tydelike lêer skryf op skyf nie.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>'n PHP-uitbreiding veroorsaak die oplaai van die lêer om te misluk.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Hierdie versameling moet {{ limit }} element of meer bevat.|Hierdie versameling moet {{ limit }} elemente of meer bevat.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Hierdie versameling moet {{ limit }} element of minder bevat.|Hierdie versameling moet {{ limit }} elemente of meer bevat.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Hierdie versameling moet presies {{ limit }} element bevat.|Hierdie versameling moet presies {{ limit }} elemente bevat.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Ongeldige kredietkaart nommer.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Nie-ondersteunde tipe kaart of ongeldige kredietkaart nommer.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ar.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ar.xlf new file mode 100644 index 0000000..4950e0c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ar.xlf @@ -0,0 +1,315 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>هذه القيمة يجب أن تكون خاطئة.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>هذه القيمة يجب أن تكون حقيقية.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>هذه القيمة يجب ان تكون من نوع {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>هذه القيمة يجب ان تكون فارغة.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>القيمة المختارة ليست خيارا صحيحا.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيارات على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيارات على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>واحد أو أكثر من القيم المعطاه خاطئ.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>لم يكن من المتوقع هذا المجال.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>هذا المجال مفقود.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>هذه القيمة ليست تاريخا صالحا.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>هذه القيمة ليست تاريخا و وقتا صالحا.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>هذه القيمة ليست عنوان بريد إلكتروني صحيح.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>لا يمكن العثور على الملف.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>الملف غير قابل للقراءة.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>الملف كبير جدا ({{ size }} {{ suffix }}).اقصى مساحه مسموح بها ({{ limit }} {{ suffix }}).</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>نوع الملف غير صحيح ({{ type }}). الانواع المسموح بها هى {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>هذه القيمة يجب ان تكون {{ limit }} او اقل.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حروف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>هذه القيمة يجب ان تكون {{ limit }} او اكثر.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حروف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>هذه القيمة يجب الا تكون فارغة.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>هذه القيمة يجب الا تكون فارغة.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>هذه القيمة يجب ان تكون فارغة.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>هذه القيمة غير صحيحة.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>هذه القيمة ليست وقت صحيح.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>هذه القيمة ليست رابط الكترونى صحيح.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>القيمتان يجب ان تكونا متساويتان.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>الملف كبير جدا. اقصى مساحه مسموح بها {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>الملف كبير جدا.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>لم استطع استقبال الملف.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>هذه القيمة يجب ان تكون رقم.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>هذا الملف ليس صورة صحيحة.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>هذه القيمة ليست عنوان رقمى صحيح.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>هذه القيمة ليست لغة صحيحة.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>هذه القيمة ليست موقع صحيح.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>هذه القيمة ليست بلدا صالحا.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>هذه القيمة مستخدمة بالفعل.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>لم استطع معرفة حجم الصورة.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>عرض الصورة كبير جدا ({{ width }}px). اقصى عرض مسموح به هو{{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>عرض الصورة صغير جدا ({{ width }}px). اقل عرض مسموح به هو{{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>طول الصورة كبير جدا ({{ height }}px). اقصى طول مسموح به هو{{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>طول الصورة صغير جدا ({{ height }}px). اقل طول مسموح به هو{{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>هذه القيمة يجب ان تكون كلمة سر المستخدم الحالية.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حروف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>تم استقبال جزء من الملف فقط.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>لم يتم ارسال اى ملف.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>لم يتم تهيئة حافظة مؤقتة فى ملف php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>لم استطع كتابة الملف المؤقت.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>احد اضافات PHP تسببت فى فشل استقبال الملف.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>رقم البطاقه غير صحيح.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>نوع البطاقه غير مدعوم او الرقم غير صحيح.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>الرقم IBAN (رقم الحساب المصرفي الدولي) الذي تم إدخاله غير صالح.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>هذه القيمة ليست ISBN-10 صالحة.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>هذه القيمة ليست ISBN-13 صالحة.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>هذه القيمة ليست ISBN-10 صالحة ولا ISBN-13 صالحة.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>هذه القيمة ليست ISSN صالحة.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>العُملة غير صحيحة.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>القيمة يجب ان تساوي {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>القيمة يجب ان تكون اعلي من {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>القيمة يجب ان تكون مساوية او اعلي من {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>القيمة يجب ان تطابق {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>القيمة يجب ان تكون اقل من {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>القيمة يجب ان تساوي او تقل عن {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>القيمة يجب ان لا تساوي {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>القيمة يجب ان لا تطابق {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>نسبة العرض على الارتفاع للصورة كبيرة جدا ({{ ratio }}). الحد الأقصى للنسبة المسموح به هو {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>نسبة العرض على الارتفاع للصورة صغيرة جدا ({{ ratio }}). الحد الأدنى للنسبة المسموح به هو {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>الصورة مربعة ({{ width }}x{{ height }}px). الصور المربعة غير مسموح بها.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>الصورة في وضع أفقي ({{ width }}x{{ height }}px). الصور في وضع أفقي غير مسموح بها.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>الصورة في وضع عمودي ({{ width }}x{{ height }}px). الصور في وضع عمودي غير مسموح بها.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>ملف فارغ غير مسموح به.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>يتعذر الإتصال بالنطاق.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>هذه القيمة غير متطابقة مع صيغة التحويل {{ charset }}.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.az.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.az.xlf new file mode 100644 index 0000000..add868c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.az.xlf @@ -0,0 +1,227 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Bu dəyər false olmalıdır.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Bu dəyər true olmalıdır.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Bu dəyərin tipi {{ type }} olmalıdır.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Bu dəyər boş olmalıdır.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Seçdiyiniz dəyər düzgün bir seçim değil.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Ən az {{ limit }} seçim qeyd edilməlidir.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Ən çox {{ limit }} seçim qeyd edilməlidir.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Təqdim edilən dəyərlərdən bir və ya bir neçəsi yanlışdır.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Bu sahə gözlənilmirdi.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Bu sahə əksikdir.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Bu dəyər düzgün bir tarix deyil.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Bu dəyər düzgün bir tarixsaat deyil.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Bu dəyər düzgün bir e-poçt adresi deyil.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Fayl tapılmadı.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Fayl oxunabilən deyil.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fayl çox böyükdür ({{ size }} {{ suffix }}). İcazə verilən maksimum fayl ölçüsü {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Faylın mime tipi yanlışdr ({{ type }}). İcazə verilən mime tipləri {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Bu dəyər {{ limit }} və ya altında olmalıdır.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Bu dəyər çox uzundur. {{ limit }} və ya daha az simvol olmalıdır.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Bu dəyər {{ limit }} veya daha fazla olmalıdır.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Bu dəyər çox qısadır. {{ limit }} və ya daha çox simvol olmalıdır.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Bu dəyər boş olmamalıdır.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Bu dəyər boş olmamalıdır.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Bu dəyər boş olmamalıdır.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Bu dəyər doğru deyil.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Bu dəyər doğru bir saat deyil.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Bu dəyər doğru bir URL değil.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>İki dəyər eyni olmalıdır.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fayl çox böyükdür. İcazə verilən ən böyük fayl ölçüsü {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Fayl çox böyükdür.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Fayl yüklənəbilmir.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Bu dəyər rəqəm olmalıdır.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Bu fayl düzgün bir şəkil deyil.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Bu düzgün bir IP adresi deyil.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Bu dəyər düzgün bir dil deyil.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Bu dəyər düzgün bir dil deyil.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Bu dəyər düzgün bir ölkə deyil.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Bu dəyər hal-hazırda istifadədədir.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Şəklin ölçüsü hesablana bilmir.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Şəklin genişliyi çox böyükdür ({{ width }}px). İcazə verilən ən böyük genişlik {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Şəklin genişliyi çox kiçikdir ({{ width }}px). Ən az {{ min_width }}px olmalıdır.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Şəklin yüksəkliyi çox böyükdür ({{ height }}px). İcazə verilən ən böyük yüksəklik {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Şəklin yüksəkliyi çox kiçikdir ({{ height }}px). Ən az {{ min_height }}px olmalıdır.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Bu dəyər istifadəçinin hazırkı parolu olmalıdır.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Bu dəyər tam olaraq {{ limit }} simvol olmaldır.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Fayl qismən yükləndi.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Fayl yüklənmədi.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>php.ini'də müvəqqəti qovluq quraşdırılmayıb.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Müvəqqəti fayl diskə yazıla bilmir.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Bir PHP əlavəsi faylın yüklənməsinə mane oldu.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Bu kolleksiyada {{ limit }} və ya daha çox element olmalıdır.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Bu kolleksiyada {{ limit }} və ya daha az element olmalıdır.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Bu kolleksiyada tam olaraq {{ limit }} element olmalıdır.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Yanlış kart nömrəsi.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Dəstəklənməyən kart tipi və ya yanlış kart nömrəsi.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.bg.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.bg.xlf new file mode 100644 index 0000000..dc6f95f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.bg.xlf @@ -0,0 +1,323 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Стойността трябва да бъде лъжа (false).</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Стойността трябва да бъде истина (true).</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Стойността трябва да бъде от тип {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Стойността трябва да бъде празна.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Избраната стойност е невалидна.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Трябва да изберете поне {{ limit }} опция.|Трябва да изберете поне {{ limit }} опции.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Трябва да изберете най-много {{ limit }} опция.|Трябва да изберете най-много {{ limit }} опции.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Една или повече от зададените стойности е невалидна.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Това поле не се е очаквало.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Това поле липсва.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Стойността не е валидна дата (date).</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Стойността не е валидна дата (datetime).</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Стойността не е валиден email адрес.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Файлът не беше открит.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Файлът не може да бъде прочетен.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Файлът е твърде голям ({{ size }} {{ suffix }}). Максималният размер е {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Майм типа на файла е невалиден ({{ type }}). Разрешени майм типове са {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Стойността трябва да бъде {{ limit }} или по-малко.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Стойността е твърде дълга. Трябва да съдържа най-много {{ limit }} символ.|Стойността е твърде дълга. Трябва да съдържа най-много {{ limit }} символа.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Стойността трябва да бъде {{ limit }} или повече.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Стойността е твърде кратка. Трябва да съдържа поне {{ limit }} символ.|Стойността е твърде кратка. Трябва да съдържа поне {{ limit }} символа.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Стойността не трябва да бъде празна.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Стойността не трябва да бъде null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Стойността трябва да бъде null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Стойността не е валидна.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Стойността не е валидно време (time).</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Стойността не е валиден URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Двете стойности трябва да бъдат равни.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Файлът е твърде голям. Разрешеният максимален размер е {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Файлът е твърде голям.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Файлът не може да бъде качен.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Стойността трябва да бъде валиден номер.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Файлът не е валидно изображение.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Това не е валиден IP адрес.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Стойността не е валиден език.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Стойността не е валидна локализация.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Стойността не е валидна държава.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Стойността вече е в употреба.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Размера на изображението не може да бъде определен.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Изображението е твърде широко ({{ width }}px). Широчината трябва да бъде максимум {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Изображението е с твърде малка широчина ({{ width }}px). Широчината трябва да бъде минимум {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Изображението е с твърде голяма височина ({{ height }}px). Височината трябва да бъде максимум {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Изображението е с твърде малка височина ({{ height }}px). Височина трябва да бъде минимум {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Стойността трябва да бъде текущата потребителска парола.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Стойността трябва да бъде точно {{ limit }} символ.|Стойността трябва да бъде точно {{ limit }} символа.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Файлът е качен частично.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Файлът не беше качен.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Не е посочена директория за временни файлове в php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Не може да запише временен файл на диска.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP разширение предизвика прекъсване на качването.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Колекцията трябва да съдържа поне {{ limit }} елемент.|Колекцията трябва да съдържа поне {{ limit }} елемента.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Колекцията трябва да съдържа най-много {{ limit }} елемент.|Колекцията трябва да съдържа най-много {{ limit }} елемента.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Колекцията трябва да съдържа точно {{ limit }} елемент.|Колекцията трябва да съдържа точно {{ limit }} елемента.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Невалиден номер на картата.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Неподдържан тип карта или невалиден номер на картата.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Невалиден Международен номер на банкова сметка (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Невалиден ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Невалиден ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Невалидна стойност както за ISBN-10, така и за ISBN-13 .</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Невалиден Международен стандартен сериен номер (ISSN).</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Невалидна валута.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Стойността трябва да бъде равна на {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Стойността трябва да бъде по-голяма от {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Стойността трябва да бъде по-голяма или равна на {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Стойността трябва да бъде идентична с {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Стойността трябва да бъде по-малка {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Стойността трябва да бъде по-малка или равна на {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Стойността не трябва да бъде равна на {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Стойността не трябва да бъде идентична с {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Изображението е с твърде голяма пропорция ({{ ratio }}). Максималната пропорция трябва да е {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Изображението е с твърде малка пропорция ({{ ratio }}). Минималната пропорция трябва да е {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Изображението е квадрат ({{ width }}x{{ height }}px). Такива изображения не са разрешени.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Изображението е с пейзажна ориентация ({{ width }}x{{ height }}px). Изображения с такава ориентация не са разрешени.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Изображението е с портретна ориентация ({{ width }}x{{ height }}px). Изображения с такава ориентация не са разрешени.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Празни файлове не са разрешени.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Хостът е недостъпен.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Стойността не съвпада с {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Невалиден бизнес идентификационен код (BIC).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Грешка</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ca.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ca.xlf new file mode 100644 index 0000000..078a25d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ca.xlf @@ -0,0 +1,311 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Aquest valor hauria de ser fals.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Aquest valor hauria de ser cert.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Aquest valor hauria de ser del tipus {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Aquest valor hauria d'estar buit.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>El valor seleccionat no és una opció vàlida.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Ha de seleccionar almenys {{ limit }} opció.|Ha de seleccionar almenys {{ limit }} opcions.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Ha de seleccionar com a màxim {{ limit }} opció.|Ha de seleccionar com a màxim {{ limit }} opcions.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Un o més dels valors facilitats són incorrectes.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Aquest camp no s'esperava.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Aquest camp està desaparegut.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Aquest valor no és una data vàlida.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Aquest valor no és una data i hora vàlida.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Aquest valor no és una adreça d'email vàlida.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>No s'ha pogut trobar l'arxiu.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>No es pot llegir l'arxiu.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>L'arxiu és massa gran ({{ size }} {{ suffix }}). La grandària màxima permesa és {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>El tipus mime de l'arxiu no és vàlid ({{ type }}). Els tipus mime vàlids són {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Aquest valor hauria de ser {{ limit }} o menys.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Aquest valor és massa llarg. Hauria de tenir {{ limit }} caràcter o menys.|Aquest valor és massa llarg. Hauria de tenir {{ limit }} caràcters o menys.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Aquest valor hauria de ser {{ limit }} o més.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Aquest valor és massa curt. Hauria de tenir {{ limit }} caràcters o més.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Aquest valor no hauria d'estar buit.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Aquest valor no hauria de ser null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Aquest valor hauria de ser null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Aquest valor no és vàlid.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Aquest valor no és una hora vàlida.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Aquest valor no és una URL vàlida.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Els dos valors haurien de ser iguals.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>L'arxiu és massa gran. El tamany màxim permés és {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>L'arxiu és massa gran.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>No es pot pujar l'arxiu.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Aquest valor hauria de ser un nombre vàlid.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>L'arxiu no és una imatge vàlida.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Això no és una adreça IP vàlida.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Aquest valor no és un idioma vàlid.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Aquest valor no és una localització vàlida.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Aquest valor no és un país vàlid.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Aquest valor ja s'ha utilitzat.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>No s'ha pogut determinar la grandària de la imatge.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>L'amplària de la imatge és massa gran ({{ width }}px). L'amplària màxima permesa són {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>L'amplària de la imatge és massa petita ({{ width }}px). L'amplària mínima requerida són {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>L'altura de la imatge és massa gran ({{ height }}px). L'altura màxima permesa són {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>L'altura de la imatge és massa petita ({{ height }}px). L'altura mínima requerida són {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Aquest valor hauria de ser la contrasenya actual de l'usuari.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Aquest valor hauria de tenir exactament {{ limit }} caràcter.|Aquest valor hauria de tenir exactament {{ limit }} caràcters.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>L'arxiu va ser només pujat parcialment.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Cap arxiu va ser pujat.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Cap carpeta temporal va ser configurada en php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>No es va poder escriure l'arxiu temporal en el disc.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Una extensió de PHP va fer que la pujada fallara.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Aquesta col·lecció ha de contenir {{ limit }} element o més.|Aquesta col·lecció ha de contenir {{ limit }} elements o més.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Aquesta col·lecció ha de contenir {{ limit }} element o menys.|Aquesta col·lecció ha de contenir {{ limit }} elements o menys.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Aquesta col·lecció ha de contenir exactament {{ limit }} element.|Aquesta col·lecció ha de contenir exactament {{ limit }} elements.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Número de targeta invàlid.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Tipus de targeta no suportada o número de targeta invàlid.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Això no és un nombre de compte bancari internacional (IBAN) vàlid.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Aquest valor no és un ISBN-10 vàlid.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Aquest valor no és un ISBN-13 vàlid.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Aquest valor no és ni un ISBN-10 vàlid ni un ISBN-13 vàlid.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Aquest valor no és un ISSN vàlid.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Aquest valor no és una divisa vàlida.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Aquest valor hauria de ser igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Aquest valor hauria de ser més gran a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Aquest valor hauria de ser major o igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Aquest valor hauria de ser idèntic a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Aquest valor hauria de ser menor a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Aquest valor hauria de ser menor o igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Aquest valor no hauria de ser igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Aquest valor no hauria de idèntic a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>La proporció de l'imatge és massa gran ({{ ratio }}). La màxima proporció permesa és {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>La proporció de l'imatge és massa petita ({{ ratio }}). La mínima proporció permesa és {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>L'imatge és quadrada({{ width }}x{{ height }}px). Les imatges quadrades no estan permeses.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>L'imatge està orientada horitzontalment ({{ width }}x{{ height }}px). Les imatges orientades horitzontalment no estan permeses.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>L'imatge està orientada verticalment ({{ width }}x{{ height }}px). Les imatges orientades verticalment no estan permeses.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>No està permès un fixter buit.</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>Aquest valor no és un UUID vàlid.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cs.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cs.xlf new file mode 100644 index 0000000..4b96669 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cs.xlf @@ -0,0 +1,323 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Tato hodnota musí být nepravdivá (false).</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Tato hodnota musí být pravdivá (true).</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Tato hodnota musí být typu {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Tato hodnota musí být prázdná.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Vybraná hodnota není platnou možností.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Musí být vybrána nejméně {{ limit }} možnost.|Musí být vybrány nejméně {{ limit }} možnosti.|Musí být vybráno nejméně {{ limit }} možností.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Musí být vybrána maximálně {{ limit }} možnost.|Musí být vybrány maximálně {{ limit }} možnosti.|Musí být vybráno maximálně {{ limit }} možností.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Některé z uvedených hodnot jsou neplatné.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Toto pole nebylo očekáváno.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Toto pole chybí.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Tato hodnota není platné datum.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Tato hodnota není platné datum s časovým údajem.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Tato hodnota není platná e-mailová adresa.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Soubor nebyl nalezen.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Soubor je nečitelný.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Soubor je příliš velký ({{ size }} {{ suffix }}). Maximální povolená velikost souboru je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Neplatný mime typ souboru ({{ type }}). Povolené mime typy souborů jsou {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Tato hodnota musí být {{ limit }} nebo méně.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Tato hodnota je příliš dlouhá. Musí obsahovat maximálně {{ limit }} znak.|Tato hodnota je příliš dlouhá. Musí obsahovat maximálně {{ limit }} znaky.|Tato hodnota je příliš dlouhá. Musí obsahovat maximálně {{ limit }} znaků.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Tato hodnota musí být {{ limit }} nebo více.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Tato hodnota je příliš krátká. Musí obsahovat minimálně {{ limit }} znak.|Tato hodnota je příliš krátká. Musí obsahovat minimálně {{ limit }} znaky.|Tato hodnota je příliš krátká. Musí obsahovat minimálně {{ limit }} znaků.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Tato hodnota nesmí být prázdná.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Tato hodnota nesmí být null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Tato hodnota musí být null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Tato hodnota není platná.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Tato hodnota není platný časový údaj.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Tato hodnota není platná URL adresa.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Tyto dvě hodnoty musí být stejné.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Soubor je příliš velký. Maximální povolená velikost souboru je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Soubor je příliš velký.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Soubor se nepodařilo nahrát.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Tato hodnota musí být číslo.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Tento soubor není obrázek.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Toto není platná IP adresa.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Tento jazyk neexistuje.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Tato lokalizace neexistuje.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Tato země neexistuje.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Tato hodnota je již používána.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Nepodařily se zjistit rozměry obrázku.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Obrázek je příliš široký ({{ width }}px). Maximální povolená šířka obrázku je {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Obrázek je příliš úzký ({{ width }}px). Minimální šířka musí být {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Obrázek je příliš vysoký ({{ height }}px). Maximální povolená výška obrázku je {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Obrázek je příliš nízký ({{ height }}px). Minimální výška obrázku musí být {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Tato hodnota musí být aktuální heslo uživatele.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Tato hodnota musí mít přesně {{ limit }} znak.|Tato hodnota musí mít přesně {{ limit }} znaky.|Tato hodnota musí mít přesně {{ limit }} znaků.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Byla nahrána jen část souboru.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Žádný soubor nebyl nahrán.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>V php.ini není nastavena cesta k adresáři pro dočasné soubory.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Dočasný soubor se nepodařilo zapsat na disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Rozšíření PHP zabránilo nahrání souboru.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Tato kolekce musí obsahovat minimálně {{ limit }} prvek.|Tato kolekce musí obsahovat minimálně {{ limit }} prvky.|Tato kolekce musí obsahovat minimálně {{ limit }} prvků.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Tato kolekce musí obsahovat maximálně {{ limit }} prvek.|Tato kolekce musí obsahovat maximálně {{ limit }} prvky.|Tato kolekce musí obsahovat maximálně {{ limit }} prvků.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Tato kolekce musí obsahovat přesně {{ limit }} prvek.|Tato kolekce musí obsahovat přesně {{ limit }} prvky.|Tato kolekce musí obsahovat přesně {{ limit }} prvků.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Neplatné číslo karty.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Nepodporovaný typ karty nebo neplatné číslo karty.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Toto je neplatný IBAN.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Tato hodnota není platné ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Tato hodnota není platné ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Tato hodnota není platné ISBN-10 ani ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Tato hodnota není platné ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Tato měna neexistuje.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Tato hodnota musí být rovna {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Tato hodnota musí být větší než {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Tato hodnota musí být větší nebo rovna {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Tato hodnota musí být typu {{ compared_value_type }} a zároveň musí být rovna {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Tato hodnota musí být menší než {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Tato hodnota musí být menší nebo rovna {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Tato hodnota nesmí být rovna {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Tato hodnota nesmí být typu {{ compared_value_type }} a zároveň nesmí být rovna {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Poměr stran obrázku je příliš velký ({{ ratio }}). Maximální povolený poměr stran obrázku je {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Poměr stran obrázku je příliš malý ({{ ratio }}). Minimální povolený poměr stran obrázku je {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Strany obrázku jsou čtvercové ({{ width }}x{{ height }}px). Čtvercové obrázky nejsou povolené.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Obrázek je orientovaný na šířku ({{ width }}x{{ height }}px). Obrázky orientované na šířku nejsou povolené.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Obrázek je orientovaný na výšku ({{ width }}x{{ height }}px). Obrázky orientované na výšku nejsou povolené.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Soubor nesmí být prázdný.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Hostitele nebylo možné rozpoznat.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Tato hodnota neodpovídá očekávané znakové sadě {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Tato hodnota není platný identifikační kód podniku (BIC).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Chyba</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cy.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cy.xlf new file mode 100644 index 0000000..da7cb9a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cy.xlf @@ -0,0 +1,227 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Dylid bod y gwerth hwn yn ffug.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Dylid bod y gwerth hwn yn wir.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Dylid bod y gwerth hwn bod o fath {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Dylid bod y gwerth hwn yn wag.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Nid yw'r gwerth â ddewiswyd yn ddilys.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Rhaid dewis o leiaf {{ limit }} opsiwn.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Rhaid dewis dim mwy na {{ limit }} opsiwn.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Mae un neu fwy o'r gwerthoedd a roddwyd yn annilys.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Nid oedd disgwyl y maes hwn.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Mae'r maes hwn ar goll.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Nid yw'r gwerth yn ddyddiad dilys.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Nid yw'r gwerth yn datetime dilys.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Nid yw'r gwerth yn gyfeiriad ebost dilys.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Ni ddarganfyddwyd y ffeil.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Ni ellir darllen y ffeil.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Mae'r ffeil yn rhy fawr ({{ size }} {{ suffix }}). Yr uchafswm â ganiateir yw {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Nid yw math mime y ffeil yn ddilys ({{ type }}). Dyma'r mathau â ganiateir {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Dylai'r gwerth hwn fod yn {{ limit }} neu lai.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Mae'r gwerth hwn rhy hir. Dylai gynnwys {{ limit }} nodyn cyfrifiadurol neu lai.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Dylai'r gwerth hwn fod yn {{ limit }} neu fwy.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Mae'r gwerth hwn yn rhy fyr. Dylai gynnwys {{ limit }} nodyn cyfrifiadurol neu fwy.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Ni ddylai'r gwerth hwn fod yn wag.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Ni ddylai'r gwerth hwn fod yn null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Dylai'r gwerth fod yn null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Nid yw'r gwerth hwn yn ddilys.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Nid yw'r gwerth hwn yn amser dilys.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Nid yw'r gwerth hwn yn URL dilys.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Rhaid i'r ddau werth fod yn gyfystyr a'u gilydd.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Mae'r ffeil yn rhy fawr. Yr uchafswm â ganiateir yw {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Mae'r ffeil yn rhy fawr.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Methwyd ag uwchlwytho'r ffeil.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Dylai'r gwerth hwn fod yn rif dilys.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Nid yw'r ffeil hon yn ddelwedd dilys.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Nid yw hwn yn gyfeiriad IP dilys.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Nid yw'r gwerth hwn yn iaith ddilys.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Nid yw'r gwerth hwn yn locale dilys.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Nid yw'r gwerth hwn yn wlad dilys.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Mae'r gwerth hwn eisoes yn cael ei ddefnyddio.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Methwyd â darganfod maint y ddelwedd.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Mae lled y ddelwedd yn rhy fawr ({{ width }}px). Y lled mwyaf â ganiateir yw {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Mae lled y ddelwedd yn rhy fach ({{ width }}px). Y lled lleiaf â ganiateir yw {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Mae uchder y ddelwedd yn rhy fawr ({{ width }}px). Yr uchder mwyaf â ganiateir yw {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Mae uchder y ddelwedd yn rhy fach ({{ width }}px). Yr uchder lleiaf â ganiateir yw {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Dylaid bod y gwerth hwn yn gyfrinair presenol y defnyddiwr.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Dylai'r gwerth hwn fod yn union {{ limit }} nodyn cyfrifiadurol o hyd.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Dim ond rhan o'r ffeil ag uwchlwythwyd.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Ni uwchlwythwyd unrhyw ffeil.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Nid oes ffolder dros-dro wedi'i gosod yn php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Methwyd ag ysgrifennu'r ffeil dros-dro ar ddisg.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Methwyd ag uwchlwytho oherwydd ategyn PHP.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Dylai'r casgliad hwn gynnwys {{ limit }} elfen neu fwy.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Dylai'r casgliad hwn gynnwys {{ limit }} elfen neu lai.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Dylai'r casgliad hwn gynnwys union {{ limit }} elfen.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Nid oedd rhif y cerdyn yn ddilys.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Unai ni dderbynir y math yna o gerdyn, neu nid yw rhif y cerdyn yn ddilys.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.da.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.da.xlf new file mode 100644 index 0000000..3a545c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.da.xlf @@ -0,0 +1,251 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Værdien skal være falsk.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Værdien skal være sand.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Værdien skal være af typen {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Værdien skal være blank.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Den valgte værdi er ikke gyldig.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Du skal vælge mindst én mulighed.|Du skal vælge mindst {{ limit }} muligheder.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Du kan højst vælge én mulighed.|Du kan højst vælge {{ limit }} muligheder.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>En eller flere af de angivne værdier er ugyldige.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Feltet blev ikke forventet.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Dette felt mangler.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Værdien er ikke en gyldig dato.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Værdien er ikke et gyldigt tidspunkt.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Værdien er ikke en gyldig e-mailadresse.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Filen kunne ikke findes.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Filen kan ikke læses.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Filen er for stor ({{ size }} {{ suffix }}). Maksimale tilladte størrelse er {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Filens MIME-type er ugyldig ({{ type }}). Tilladte MIME-typer er {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Værdien skal være {{ limit }} eller mindre.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Værdien er for lang. Den må højst indeholde {{ limit }} tegn.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Værdien skal være {{ limit }} eller mere.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Værdien er for kort. Den skal indeholde mindst {{ limit }} tegn.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Værdien må ikke være blank.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Værdien må ikke være tom (null).</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Værdien skal være tom (null).</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Værdien er ikke gyldig.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Værdien er ikke et gyldigt klokkeslæt.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Værdien er ikke en gyldig URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>De to værdier skal være ens.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Filen er for stor. Den maksimale størrelse er {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Filen er for stor.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Filen kunne ikke blive uploadet.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Værdien skal være et gyldigt tal.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Filen er ikke gyldigt billede.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Dette er ikke en gyldig IP-adresse.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Værdien er ikke et gyldigt sprog.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Værdien er ikke en gyldig lokalitet.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Værdien er ikke et gyldigt land.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Værdien er allerede i brug.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Størrelsen på billedet kunne ikke detekteres.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Billedet er for bredt ({{ width }}px). Største tilladte bredde er {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Billedet er for smalt ({{ width }}px). Mindste forventede bredde er {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Billedet er for højt ({{ height }}px). Største tilladte højde er {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Billedet er for lavt ({{ height }}px). Mindste forventede højde er {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Værdien skal være brugerens nuværende adgangskode.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Værdien skal være på præcis {{ limit }} tegn.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Filen blev kun delvist uploadet.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Ingen fil blev uploadet.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Ingen midlertidig mappe er konfigureret i php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Kan ikke skrive midlertidig fil til disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>En PHP-udvidelse forårsagede fejl i upload.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Denne samling skal indeholde mindst ét element.|Denne samling skal indeholde mindst {{ limit }} elementer.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Denne samling skal indeholde højst ét element.|Denne samling skal indeholde højst {{ limit }} elementer.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Denne samling skal indeholde præcis ét element.|Denne samling skal indeholde præcis {{ limit }} elementer.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Ugyldigt kortnummer.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Ikke-understøttet korttype eller ugyldigt kortnummer.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Det er ikke et gyldigt International Bank Account Number (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Værdien er ikke en gyldig ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Værdien er ikke en gyldig ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Værdien er hverken en gyldig ISBN-10 eller en gyldig ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Værdien er ikke en gyldig ISSN.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Fejl</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.de.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.de.xlf new file mode 100644 index 0000000..3e44e1e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.de.xlf @@ -0,0 +1,327 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Dieser Wert sollte false sein.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Dieser Wert sollte true sein.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Dieser Wert sollte vom Typ {{ type }} sein.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Dieser Wert sollte leer sein.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Sie haben einen ungültigen Wert ausgewählt.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Sie müssen mindestens {{ limit }} Möglichkeit wählen.|Sie müssen mindestens {{ limit }} Möglichkeiten wählen.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Sie dürfen höchstens {{ limit }} Möglichkeit wählen.|Sie dürfen höchstens {{ limit }} Möglichkeiten wählen.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Einer oder mehrere der angegebenen Werte sind ungültig.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Dieses Feld wurde nicht erwartet.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Dieses Feld fehlt.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Dieser Wert entspricht keiner gültigen Datumsangabe.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Dieser Wert entspricht keiner gültigen Datums- und Zeitangabe.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Dieser Wert ist keine gültige E-Mail-Adresse.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Die Datei wurde nicht gefunden.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Die Datei ist nicht lesbar.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Die Datei ist zu groß ({{ size }} {{ suffix }}). Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Der Dateityp ist ungültig ({{ type }}). Erlaubte Dateitypen sind {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Dieser Wert sollte kleiner oder gleich {{ limit }} sein.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Diese Zeichenkette ist zu lang. Sie sollte höchstens {{ limit }} Zeichen haben.|Diese Zeichenkette ist zu lang. Sie sollte höchstens {{ limit }} Zeichen haben.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Dieser Wert sollte größer oder gleich {{ limit }} sein.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Diese Zeichenkette ist zu kurz. Sie sollte mindestens {{ limit }} Zeichen haben.|Diese Zeichenkette ist zu kurz. Sie sollte mindestens {{ limit }} Zeichen haben.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Dieser Wert sollte nicht leer sein.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Dieser Wert sollte nicht null sein.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Dieser Wert sollte null sein.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Dieser Wert ist nicht gültig.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Dieser Wert entspricht keiner gültigen Zeitangabe.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Dieser Wert ist keine gültige URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Die beiden Werte sollten identisch sein.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Die Datei ist zu groß. Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Die Datei ist zu groß.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Die Datei konnte nicht hochgeladen werden.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Dieser Wert sollte eine gültige Zahl sein.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Diese Datei ist kein gültiges Bild.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Dies ist keine gültige IP-Adresse.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Dieser Wert entspricht keiner gültigen Sprache.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Dieser Wert entspricht keinem gültigen Gebietsschema.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Dieser Wert entspricht keinem gültigen Land.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Dieser Wert wird bereits verwendet.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Die Größe des Bildes konnte nicht ermittelt werden.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Die Bildbreite ist zu groß ({{ width }}px). Die maximal zulässige Breite beträgt {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Die Bildbreite ist zu gering ({{ width }}px). Die erwartete Mindestbreite beträgt {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Die Bildhöhe ist zu groß ({{ height }}px). Die maximal zulässige Höhe beträgt {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Die Bildhöhe ist zu gering ({{ height }}px). Die erwartete Mindesthöhe beträgt {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Dieser Wert sollte dem aktuellen Benutzerpasswort entsprechen.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Dieser Wert sollte genau {{ limit }} Zeichen lang sein.|Dieser Wert sollte genau {{ limit }} Zeichen lang sein.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Die Datei wurde nur teilweise hochgeladen.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Es wurde keine Datei hochgeladen.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Es wurde kein temporärer Ordner in der php.ini konfiguriert oder der temporäre Ordner existiert nicht.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Kann die temporäre Datei nicht speichern.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Eine PHP-Erweiterung verhinderte den Upload.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Diese Sammlung sollte {{ limit }} oder mehr Elemente beinhalten.|Diese Sammlung sollte {{ limit }} oder mehr Elemente beinhalten.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Diese Sammlung sollte {{ limit }} oder weniger Elemente beinhalten.|Diese Sammlung sollte {{ limit }} oder weniger Elemente beinhalten.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Diese Sammlung sollte genau {{ limit }} Element beinhalten.|Diese Sammlung sollte genau {{ limit }} Elemente beinhalten.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Ungültige Kartennummer.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Nicht unterstützer Kartentyp oder ungültige Kartennummer.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Dieser Wert ist keine gültige internationale Bankkontonummer (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Dieser Wert entspricht keiner gültigen ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Dieser Wert entspricht keiner gültigen ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Dieser Wert ist weder eine gültige ISBN-10 noch eine gültige ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Dieser Wert ist keine gültige ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Dieser Wert ist keine gültige Währung.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Dieser Wert sollte gleich {{ compared_value }} sein.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Dieser Wert sollte größer als {{ compared_value }} sein.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Dieser Wert sollte größer oder gleich {{ compared_value }} sein.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Dieser Wert sollte identisch sein mit {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Dieser Wert sollte kleiner als {{ compared_value }} sein.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Dieser Wert sollte kleiner oder gleich {{ compared_value }} sein.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Dieser Wert sollte nicht {{ compared_value }} sein.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Dieser Wert sollte nicht identisch sein mit {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Das Seitenverhältnis des Bildes ist zu groß ({{ ratio }}). Der erlaubte Maximalwert ist {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Das Seitenverhältnis des Bildes ist zu klein ({{ ratio }}). Der erwartete Minimalwert ist {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Das Bild ist quadratisch ({{ width }}x{{ height }}px). Quadratische Bilder sind nicht erlaubt.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Das Bild ist im Querformat ({{ width }}x{{ height }}px). Bilder im Querformat sind nicht erlaubt.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Das Bild ist im Hochformat ({{ width }}x{{ height }}px). Bilder im Hochformat sind nicht erlaubt.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Eine leere Datei ist nicht erlaubt.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Der Hostname konnte nicht aufgelöst werden.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Dieser Wert entspricht nicht dem erwarteten Zeichensatz {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Dieser Wert ist kein gültiger BIC.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Fehler</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>Dies ist keine gültige UUID.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.el.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.el.xlf new file mode 100644 index 0000000..a3199bc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.el.xlf @@ -0,0 +1,283 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Αυτή η τιμή πρέπει να είναι ψευδής.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Αυτή η τιμή πρέπει να είναι αληθής.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Αυτή η τιμή πρέπει να είναι τύπου {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Αυτή η τιμή πρέπει να είναι κενή.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Η τιμή που επιλέχθηκε δεν αντιστοιχεί σε έγκυρη επιλογή.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Πρέπει να επιλέξετε τουλάχιστον {{ limit }} επιλογή.|Πρέπει να επιλέξετε τουλάχιστον {{ limit }} επιλογές.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Πρέπει να επιλέξετε το πολύ {{ limit }} επιλογή.|Πρέπει να επιλέξετε το πολύ {{ limit }} επιλογές.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Μια ή περισσότερες τιμές δεν είναι έγκυρες.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Αυτό το πεδίο δεν ήταν αναμενόμενο.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Λείπει αυτό το πεδίο.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Η τιμή δεν αντιστοιχεί σε έγκυρη ημερομηνία.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Η τιμή δεν αντιστοιχεί σε έγκυρη ημερομηνία και ώρα.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Η τιμή δεν αντιστοιχεί σε έγκυρο email.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Το αρχείο δε μπορεί να βρεθεί.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Το αρχείο δεν είναι αναγνώσιμο.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Το αρχείο είναι πολύ μεγάλο ({{ size }} {{ suffix }}). Το μέγιστο επιτρεπτό μέγεθος είναι {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Ο τύπος mime του αρχείου δεν είναι έγκυρος ({{ type }}). Οι έγκρυοι τύποι mime είναι {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Αυτή η τιμή θα έπρεπε να είναι {{ limit }} ή λιγότερο.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Αυτή η τιμή είναι πολύ μεγάλη. Θα έπρεπε να έχει {{ limit }} χαρακτήρα ή λιγότερο.|Αυτή η τιμή είναι πολύ μεγάλη. Θα έπρεπε να έχει {{ limit }} χαρακτήρες ή λιγότερο.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Αυτή η τιμή θα έπρεπε να είναι {{ limit }} ή περισσότερο.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Αυτή η τιμή είναι πολύ μικρή. Θα έπρεπε να έχει {{ limit }} χαρακτήρα ή περισσότερο.|Αυτή η τιμή είναι πολύ μικρή. Θα έπρεπε να έχει {{ limit }} χαρακτήρες ή περισσότερο.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Αυτή η τιμή δεν πρέπει να είναι κενή.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Αυτή η τιμή δεν πρέπει να είναι μηδενική.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Αυτή η τιμή πρέπει να είναι μηδενική.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Αυτή η τιμή δεν είναι έγκυρη.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Αυτή η τιμή δεν αντιστοιχεί σε έγκυρη ώρα.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Αυτή η τιμή δεν αντιστοιχεί σε έγκυρο URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Οι δύο τιμές θα πρέπει να είναι ίδιες.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Το αρχείο είναι πολύ μεγάλο. Το μέγιστο επιτρεπτό μέγεθος είναι {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Το αρχείο είναι πολύ μεγάλο.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Το αρχείο δε μπορεί να ανέβει.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Αυτή η τιμή θα πρέπει να είναι ένας έγκυρος αριθμός.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Το αρχείο δεν αποτελεί έγκυρη εικόνα.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Αυτό δεν είναι μια έγκυρη διεύθυνση IP.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Αυτή η τιμή δεν αντιστοιχεί σε μια έγκυρη γλώσσα.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Αυτή η τιμή δεν αντιστοιχεί σε έκγυρο κωδικό τοποθεσίας.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Αυτή η τιμή δεν αντιστοιχεί σε μια έγκυρη χώρα.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Αυτή η τιμή χρησιμοποιείται ήδη.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Το μέγεθος της εικόνας δεν ήταν δυνατό να ανιχνευθεί.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Το πλάτος της εικόνας είναι πολύ μεγάλο ({{ width }}px). Το μέγιστο επιτρεπτό πλάτος είναι {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Το πλάτος της εικόνας είναι πολύ μικρό ({{ width }}px). Το ελάχιστο επιτρεπτό πλάτος είναι {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Το ύψος της εικόνας είναι πολύ μεγάλο ({{ height }}px). Το μέγιστο επιτρεπτό ύψος είναι {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Το ύψος της εικόνας είναι πολύ μικρό ({{ height }}px). Το ελάχιστο επιτρεπτό ύψος είναι {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Αυτή η τιμή θα έπρεπε να είναι ο τρέχων κωδικός.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Αυτή η τιμή θα έπρεπε να έχει ακριβώς {{ limit }} χαρακτήρα.|Αυτή η τιμή θα έπρεπε να έχει ακριβώς {{ limit }} χαρακτήρες.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Το αρχείο δεν ανέβηκε ολόκληρο.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Δεν ανέβηκε κανένα αρχείο.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Κανένας προσωρινός φάκελος δεν έχει ρυθμιστεί στο php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Αδυναμία εγγραφής προσωρινού αρχείου στο δίσκο.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Μια επέκταση PHP προκάλεσε αδυναμία ανεβάσματος.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Αυτή η συλλογή θα πρέπει να περιέχει {{ limit }} στοιχείο ή περισσότερα.|Αυτή η συλλογή θα πρέπει να περιέχει {{ limit }} στοιχεία ή περισσότερα.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Αυτή η συλλογή θα πρέπει να περιέχει {{ limit }} στοιχείo ή λιγότερα.|Αυτή η συλλογή θα πρέπει να περιέχει {{ limit }} στοιχεία ή λιγότερα.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Αυτή η συλλογή θα πρέπει να περιέχει ακριβώς {{ limit }} στοιχείo.|Αυτή η συλλογή θα πρέπει να περιέχει ακριβώς {{ limit }} στοιχεία.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Μη έγκυρος αριθμός κάρτας.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Μη υποστηριζόμενος τύπος κάρτας ή μη έγκυρος αριθμός κάρτας.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Αυτό δεν αντιστοιχεί σε έκγυρο διεθνή αριθμό τραπεζικού λογαριασμού (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Αυτό δεν είναι έγκυρος κωδικός ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Αυτό δεν είναι έγκυρος κωδικός ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Αυτό δεν είναι ούτε έγκυρος κωδικός ISBN-10 ούτε έγκυρος κωδικός ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Αυτό δεν είναι έγκυρος κωδικός ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Αυτό δεν αντιστοιχεί σε έγκυρο νόμισμα.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Αυτή η τιμή θα πρέπει να είναι ίση με {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Αυτή η τιμή θα πρέπει να είναι μεγαλύτερη από {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Αυτή η τιμή θα πρέπει να είναι μεγαλύτερη ή ίση με {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Αυτή η τιμή θα πρέπει να είναι πανομοιότυπη με {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Αυτή η τιμή θα πρέπει να είναι μικρότερη από {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Αυτή η τιμή θα πρέπει να είναι μικρότερη ή ίση με {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Αυτή η τιμή δεν θα πρέπει να είναι ίση με {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Αυτή η τιμή δεν πρέπει να είναι πανομοιότυπη με {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.en.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.en.xlf new file mode 100644 index 0000000..4bb2760 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.en.xlf @@ -0,0 +1,331 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>This value should be false.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>This value should be true.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>This value should be of type {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>This value should be blank.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>The value you selected is not a valid choice.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>One or more of the given values is invalid.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>This field was not expected.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>This field is missing.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>This value is not a valid date.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>This value is not a valid datetime.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>This value is not a valid email address.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>The file could not be found.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>The file is not readable.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>This value should be {{ limit }} or less.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>This value should be {{ limit }} or more.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>This value should not be blank.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>This value should not be null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>This value should be null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>This value is not valid.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>This value is not a valid time.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>This value is not a valid URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>The two values should be equal.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>The file is too large.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>The file could not be uploaded.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>This value should be a valid number.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>This file is not a valid image.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>This is not a valid IP address.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>This value is not a valid language.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>This value is not a valid locale.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>This value is not a valid country.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>This value is already used.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>The size of the image could not be detected.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>This value should be the user's current password.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>The file was only partially uploaded.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>No file was uploaded.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>No temporary folder was configured in php.ini, or the configured folder does not exist.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Cannot write temporary file to disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>A PHP extension caused the upload to fail.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Invalid card number.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Unsupported card type or invalid card number.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>This is not a valid International Bank Account Number (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>This value is not a valid ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>This value is not a valid ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>This value is neither a valid ISBN-10 nor a valid ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>This value is not a valid ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>This value is not a valid currency.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>This value should be equal to {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>This value should be greater than {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>This value should be greater than or equal to {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>This value should be less than {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>This value should be less than or equal to {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>This value should not be equal to {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>An empty file is not allowed.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>The host could not be resolved.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>This value does not match the expected {{ charset }} charset.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>This is not a valid Business Identifier Code (BIC).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Error</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>This is not a valid UUID.</target> + </trans-unit> + <trans-unit id="84"> + <source>This value should be a multiple of {{ compared_value }}.</source> + <target>This value should be a multiple of {{ compared_value }}.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.es.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.es.xlf new file mode 100644 index 0000000..25d5b8a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.es.xlf @@ -0,0 +1,327 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Este valor debería ser falso.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Este valor debería ser verdadero.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Este valor debería ser de tipo {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Este valor debería estar vacío.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>El valor seleccionado no es una opción válida.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Debe seleccionar al menos {{ limit }} opción.|Debe seleccionar al menos {{ limit }} opciones.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Debe seleccionar como máximo {{ limit }} opción.|Debe seleccionar como máximo {{ limit }} opciones.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Uno o más de los valores indicados no son válidos.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Este campo no se esperaba.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Este campo está desaparecido.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Este valor no es una fecha válida.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Este valor no es una fecha y hora válidas.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Este valor no es una dirección de email válida.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>No se pudo encontrar el archivo.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>No se puede leer el archivo.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>El archivo es demasiado grande ({{ size }} {{ suffix }}). El tamaño máximo permitido es {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>El tipo mime del archivo no es válido ({{ type }}). Los tipos mime válidos son {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Este valor debería ser {{ limit }} o menos.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Este valor es demasiado largo. Debería tener {{ limit }} carácter o menos.|Este valor es demasiado largo. Debería tener {{ limit }} caracteres o menos.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Este valor debería ser {{ limit }} o más.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Este valor es demasiado corto. Debería tener {{ limit }} carácter o más.|Este valor es demasiado corto. Debería tener {{ limit }} caracteres o más.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Este valor no debería estar vacío.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Este valor no debería ser nulo.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Este valor debería ser nulo.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Este valor no es válido.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Este valor no es una hora válida.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Este valor no es una URL válida.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Los dos valores deberían ser iguales.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>El archivo es demasiado grande. El tamaño máximo permitido es {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>El archivo es demasiado grande.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>No se pudo subir el archivo.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Este valor debería ser un número válido.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>El archivo no es una imagen válida.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Esto no es una dirección IP válida.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Este valor no es un idioma válido.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Este valor no es una localización válida.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Este valor no es un país válido.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Este valor ya se ha utilizado.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>No se pudo determinar el tamaño de la imagen.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>El ancho de la imagen es demasiado grande ({{ width }}px). El ancho máximo permitido es de {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>El ancho de la imagen es demasiado pequeño ({{ width }}px). El ancho mínimo requerido es {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>La altura de la imagen es demasiado grande ({{ height }}px). La altura máxima permitida es de {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>La altura de la imagen es demasiado pequeña ({{ height }}px). La altura mínima requerida es de {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Este valor debería ser la contraseña actual del usuario.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Este valor debería tener exactamente {{ limit }} carácter.|Este valor debería tener exactamente {{ limit }} caracteres.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>El archivo fue sólo subido parcialmente.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Ningún archivo fue subido.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Ninguna carpeta temporal fue configurada en php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>No se pudo escribir el archivo temporal en el disco.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Una extensión de PHP hizo que la subida fallara.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Esta colección debe contener {{ limit }} elemento o más.|Esta colección debe contener {{ limit }} elementos o más.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Esta colección debe contener {{ limit }} elemento o menos.|Esta colección debe contener {{ limit }} elementos o menos.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Esta colección debe contener exactamente {{ limit }} elemento.|Esta colección debe contener exactamente {{ limit }} elementos.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Número de tarjeta inválido.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Tipo de tarjeta no soportado o número de tarjeta inválido.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Esto no es un International Bank Account Number (IBAN) válido.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Este valor no es un ISBN-10 válido.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Este valor no es un ISBN-13 válido.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Este valor no es ni un ISBN-10 válido ni un ISBN-13 válido.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Este valor no es un ISSN válido.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Este valor no es una divisa válida.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Este valor debería ser igual que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Este valor debería ser mayor que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Este valor debería ser mayor o igual que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Este valor debería ser idéntico a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Este valor debería ser menor que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Este valor debería ser menor o igual que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Este valor debería ser distinto de {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Este valor no debería ser idéntico a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>La proporción de la imagen es demasiado grande ({{ ratio }}). La máxima proporción permitida es {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>La proporción de la imagen es demasiado pequeña ({{ ratio }}). La mínima proporción permitida es {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>La imagen es cuadrada ({{ width }}x{{ height }}px). Las imágenes cuadradas no están permitidas.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>La imagen está orientada horizontalmente ({{ width }}x{{ height }}px). Las imágenes orientadas horizontalmente no están permitidas.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>La imagen está orientada verticalmente ({{ width }}x{{ height }}px). Las imágenes orientadas verticalmente no están permitidas.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>No está permitido un archivo vacío.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>No se puede resolver el host.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>La codificación de caracteres para este valor debería ser {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>No es un Código de Identificación Bancaria (BIC) válido.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Error</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>Este valor no es un UUID válido.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.et.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.et.xlf new file mode 100644 index 0000000..d047c8b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.et.xlf @@ -0,0 +1,283 @@ +<?xml version='1.0'?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Väärtus peaks olema väär.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Väärtus peaks oleme tõene.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Väärtus peaks olema {{ type }}-tüüpi.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Väärtus peaks olema tühi.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Väärtus peaks olema üks etteantud valikutest.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Valima peaks vähemalt {{ limit }} valikut.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Valima peaks mitte rohkem kui {{ limit }} valikut.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>One or more of the given values is invalid.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>See väli ei oodatud.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>See väli on puudu.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Väärtus pole korrektne kuupäev.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Väärtus pole korrektne kuupäev ja kellaeg.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Väärtus pole korrektne e-maili aadress.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Faili ei leita.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Fail ei ole loetav.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fail on liiga suur ({{ size }} {{ suffix }}). Suurim lubatud suurus on {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Faili sisutüüp on vigane ({{ type }}). Lubatud sisutüübid on {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Väärtus peaks olema {{ limit }} või vähem.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Väärtus on liiga pikk. Pikkus peaks olema {{ limit }} tähemärki või vähem.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Väärtus peaks olema {{ limit }} või rohkem.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Väärtus on liiga lühike. Pikkus peaks olema {{ limit }} tähemärki või rohkem.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Väärtus ei tohiks olla tühi.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Väärtus ei tohiks olla 'null'.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Väärtus peaks olema 'null'.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Väärtus on vigane.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Väärtus pole korrektne aeg.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Väärtus pole korrektne URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Väärtused peaksid olema võrdsed.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fail on liiga suur. Maksimaalne lubatud suurus on {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Fail on liiga suur.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Faili ei saa üles laadida.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Väärtus peaks olema korrektne number.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Fail ei ole korrektne pilt.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>IP aadress pole korrektne.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Väärtus pole korrektne keel.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Väärtus pole korrektne asukohakeel.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Väärtus pole olemasolev riik.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Väärtust on juba kasutatud.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Pildi suurust polnud võimalik tuvastada.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Pilt on liiga lai ({{ width }}px). Suurim lubatud laius on {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Pilt on liiga kitsas ({{ width }}px). Vähim lubatud laius on {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Pilt on liiga pikk ({{ height }}px). Lubatud suurim pikkus on {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Pilt pole piisavalt pikk ({{ height }}px). Lubatud vähim pikkus on {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Väärtus peaks olema kasutaja kehtiv salasõna.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} characters.</source> + <target>Väärtus peaks olema täpselt {{ limit }} tähemärk pikk.|Väärtus peaks olema täpselt {{ limit }} tähemärki pikk.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Fail ei laetud täielikult üles.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Ühtegi faili ei laetud üles.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Ühtegi ajutist kausta polnud php.ini-s seadistatud.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Ajutist faili ei saa kettale kirjutada.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP laiendi tõttu ebaõnnestus faili üleslaadimine.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} elements or more.</source> + <target>Kogumikus peaks olema vähemalt {{ limit }} element.|Kogumikus peaks olema vähemalt {{ limit }} elementi.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} elements or less.</source> + <target>Kogumikus peaks olema ülimalt {{ limit }} element.|Kogumikus peaks olema ülimalt {{ limit }} elementi.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} elements.</source> + <target>Kogumikus peaks olema täpselt {{ limit }} element.|Kogumikus peaks olema täpselt {{ limit }}|elementi.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Vigane kaardi number.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Kaardi tüüpi ei toetata või kaardi number on vigane.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Väärtus pole korrektne IBAN-number.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Väärtus pole korrektne ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Väärtus pole korrektne ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Väärtus pole korrektne ISBN-10 ega ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Väärtus pole korrektne ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Väärtus pole korrektne valuuta.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Väärtus peaks olema võrdne {{ compared_value }}-ga.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Väärtus peaks olema suurem kui {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Väärtus peaks olema suurem kui või võrduma {{ compared_value }}-ga.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Väärtus peaks olema identne väärtusega {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Väärtus peaks olema väiksem kui {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Väärtus peaks olema väiksem kui või võrduma {{ compared_value }}-ga.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Väärtus ei tohiks võrduda {{ compared_value }}-ga.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Väärtus ei tohiks olla identne väärtusega {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.eu.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.eu.xlf new file mode 100644 index 0000000..d311ded --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.eu.xlf @@ -0,0 +1,291 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Balio hau faltsua izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Balio hau egia izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Balio hau {{ type }} motakoa izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Balio hau hutsik egon beharko litzateke.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Hautatu duzun balioa ez da aukera egoki bat.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Gutxienez aukera {{ limit }} hautatu behar duzu.|Gutxienez {{ limit }} aukera hautatu behar dituzu.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Gehienez aukera {{ limit }} hautatu behar duzu.|Gehienez {{ limit }} aukera hautatu behar dituzu.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Emandako balioetatik gutxienez bat ez da egokia.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Eremu hau ez zen espero.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Eremu hau falta da.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Balio hau ez da data egoki bat.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Balio hau ez da data-ordu egoki bat.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Balio hau ez da posta elektroniko egoki bat.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Ezin izan da fitxategia aurkitu.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Fitxategia ez da irakurgarria.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fitxategia handiegia da ({{ size }} {{ suffix }}). Baimendutako tamaina handiena {{ limit }} {{ suffix }} da.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Fitxategiaren mime mota ez da egokia ({{ type }}). Hauek dira baimendutako mime motak: {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Balio hau gehienez {{ limit }} izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Balio hau luzeegia da. Gehienez karaktere {{ limit }} eduki beharko luke.|Balio hau luzeegia da. Gehienez {{ limit }} karaktere eduki beharko lituzke.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Balio hau gutxienez {{ limit }} izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Balio hau motzegia da. Karaktere {{ limit }} gutxienez eduki beharko luke.|Balio hau motzegia da. Gutxienez {{ limit }} karaktere eduki beharko lituzke.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Balio hau ez litzateke hutsik egon behar.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Balio hau ez litzateke nulua izan behar.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Balio hau nulua izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Balio hau ez da egokia.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Balio hau ez da ordu egoki bat.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Balio hau ez da baliabideen kokatzaile uniforme (URL) egoki bat.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Bi balioak berdinak izan beharko lirateke.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fitxategia handiegia da. Baimendutako tamaina handiena {{ limit }} {{ suffix }} da.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Fitxategia handiegia da.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Ezin izan da fitxategia igo.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Balio hau zenbaki egoki bat izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Fitxategi hau ez da irudi egoki bat.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Honako hau ez da IP helbide egoki bat.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Balio hau ez da hizkuntza egoki bat.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Balio hau ez da kokapen egoki bat.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Balio hau ez da herrialde egoki bat.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Balio hau jadanik erabilia izan da.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Ezin izan da irudiaren tamaina detektatu.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Irudiaren zabalera handiegia da ({{ width }}px). Onartutako gehienezko zabalera {{ max_width }}px dira.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Irudiaren zabalera txikiegia da ({{ width }}px). Onartutako gutxieneko zabalera {{ min_width }}px dira.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Irudiaren altuera handiegia da ({{ height }}px). Onartutako gehienezko altuera {{ max_height }}px dira.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Irudiaren altuera txikiegia da ({{ height }}px). Onartutako gutxieneko altuera {{ min_height }}px dira.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Balio hau uneko erabiltzailearen pasahitza izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Balio honek zehazki karaktere {{ limit }} izan beharko luke.|Balio honek zehazki {{ limit }} karaktere izan beharko lituzke.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Fitxategiaren zati bat bakarrik igo da.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Ez da fitxategirik igo.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Ez da aldi baterako karpetarik konfiguratu php.ini fitxategian.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Ezin izan da aldi baterako fitxategia diskoan idatzi.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP luzapen batek igoeraren hutsa eragin du.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Bilduma honek gutxienez elementu {{ limit }} eduki beharko luke.|Bilduma honek gutxienez {{ limit }} elementu eduki beharko lituzke.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Bilduma honek gehienez elementu {{ limit }} eduki beharko luke.|Bilduma honek gehienez {{ limit }} elementu eduki beharko lituzke.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Bilduma honek zehazki elementu {{ limit }} eduki beharko luke.|Bilduma honek zehazki {{ limit }} elementu eduki beharko lituzke.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Txartel zenbaki baliogabea.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Txartel mota onartezina edo txartel zenbaki baliogabea.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Hau ez da baliozko banku internazionaleko kontu zenbaki (IBAN) bat.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Balio hau ez da onartutako ISBN-10 bat.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Balio hau ez da onartutako ISBN-13 bat.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Balio hau ez da onartutako ISBN-10 edo ISBN-13 bat.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Balio hau ez da onartutako ISSN bat.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Balio hau ez da baliozko moneta bat.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Balio hau {{ compared_value }}-(r)en berbera izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Balio hau {{ compared_value }} baino handiagoa izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Balio hau {{ compared_value }}-(r)en berdina edota handiagoa izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Balio hau {{ compared_value_type }} {{ compared_value }}-(r)en berbera izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Balio hau {{ compared_value }} baino txikiagoa izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Balio hau {{ compared_value }}-(r)en berdina edota txikiagoa izan beharko litzateke.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Balio hau ez litzateke {{ compared_value }}-(r)en berdina izan behar.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Balio hau ez litzateke {{ compared_value_type }} {{ compared_value }}-(r)en berbera izan behar.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Errore</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>Balio hau ez da onartutako UUID bat.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fa.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fa.xlf new file mode 100644 index 0000000..98b4bd6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fa.xlf @@ -0,0 +1,283 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target state="needs-review-translation">این مقدار باید نادرست(False) باشد.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>این مقدار باید درست(True) باشد.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>این مقدار باید از نوع {{ type }} باشد.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>این فیلد باید خالی باشد.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>گزینه انتخابی معتبر نیست.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>باید حداقل {{ limit }} گزینه انتخاب کنید.|باید حداقل {{ limit }} گزینه انتخاب کنید.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>حداکثر {{ limit }} گزینه می توانید انتخاب کنید.|حداکثر {{ limit }} گزینه می توانید انتخاب کنید.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>یک یا چند مقدار نامعتبر وجود دارد.</target> + </trans-unit> + <trans-unit id="9"> + <source>The fields {{ fields }} were not expected.</source> + <target>فیلدهای {{ fields }} اضافی هستند.</target> + </trans-unit> + <trans-unit id="10"> + <source>The fields {{ fields }} are missing.</source> + <target>فیلدهای {{ fields }} کم هستند.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>این مقدار یک تاریخ معتبر نیست.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>این مقدار یک تاریخ و زمان معتبر نیست.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>این یک رایانامه معتبر نیست.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>فایل پیدا نشد.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>فایل قابلیت خواندن ندارد.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>فایل بیش از اندازه بزرگ است({{ size }} {{ suffix }}). حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>این نوع فایل مجاز نیست({{ type }}). نوع های مجاز {{ types }} هستند.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>این مقدار باید کوچکتر یا مساوی {{ limit }} باشد.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>بسیار طولانی است.حداکثر تعداد حروف مجاز برابر {{ limit }} است.|بسیار طولانی است.حداکثر تعداد حروف مجاز برابر {{ limit }} است.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>این مقدار باید برابر و یا بیشتر از {{ limit }} باشد.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>بسیار کوتاه است.تعداد حروف باید حداقل {{ limit }} باشد.|بسیار کوتاه است.تعداد حروف باید حداقل {{ limit }} باشد.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>این مقدار نباید تهی باشد.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>باید مقداری داشته باشد..</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>نباید مقداری داشته باشد.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>این مقدار معتبر نیست.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>این مقدار یک زمان صحیح نیست.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>این یک URL معتبر نیست.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>دو مقدار باید برابر باشند.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>فایل بیش از اندازه بزرگ است. حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>فایل بیش از اندازه بزرگ است.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>بارگذاری فایل با شکست مواجه شد.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>این مقدار باید یک عدد معتبر باشد.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>این فایل یک تصویر نیست.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>این مقدار یک IP معتبر نیست.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>این مقدار یک زبان صحیح نیست.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>این مقدار یک محل صحیح نیست.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>این مقدار یک کشور صحیح نیست.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>این مقدار قبلا مورد استفاده قرار گرفته است.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>اندازه تصویر قابل شناسایی نیست.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>طول تصویر بسیار بزرگ است ({{ width }}px). بشینه طول مجاز {{ max_width }}px است.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>طول تصویر بسیار کوچک است ({{ width }}px). کمینه طول موردنظر {{ min_width }}px است.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>ارتفاع تصویر بسیار بزرگ است ({{ height }}px). بشینه ارتفاع مجاز {{ max_height }}px است.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>ارتفاع تصویر بسیار کوچک است ({{ height }}px). کمینه ارتفاع موردنظر {{ min_height }}px است.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>این مقدار می بایست کلمه عبور کنونی کاربر باشد.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target> این مقدار می بایست دقیقا {{ limit }} کاراکتر داشته باشد.| این مقدار می بایست دقیقا {{ limit }} کاراکتر داشته باشد.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>فایل به صورت جزیی بارگذاری شده است.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>هیچ فایلی بارگذاری نشد.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>فولدر موقت در php.ini پیکربندی نشده است.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>فایل موقت را نمی توان در دیسک نوشت.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>اکستنشن PHP موجب شد که بارگذاری فایل با شکست مواجه شود.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>این مجموعه می بایست دارای {{ limit }} عنصر یا بیشتر باشد.|این مجموعه می بایست دارای {{ limit }} عنصر یا بیشتر باشد.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>این مجموعه می بایست دارای حداقل {{ limit }} عنصر یا کمتر باشد.|این مجموعه می بایست دارای {{ limit }} عنصر یا کمتر باشد.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>این مجموعه می بایست به طور دقیق دارا {{ limit }} عنصر باشد.|این مجموعه می بایست به طور دقیق دارای {{ limit }} قلم باشد.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>شماره کارت نامعتبر است.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>نوع کارت پشتیبانی نمی شود یا شماره کارت نامعتبر است.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>این یک شماره حساب بین المللی بانک (IBAN) درست نیست.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>این مقدار یک ISBN-10 درست نیست.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>این مقدار یک ISBN-13 درست نیست.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>این مقدار یک ISBN-10 درست یا ISBN-13 درست نیست.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>این مقدار یک ISSN درست نیست.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>این مقدار یک یکای پول درست نیست.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>این مقدار باید برابر با {{ compared_value }} باشد.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>این مقدار باید از {{ compared_value }} بیشتر باشد.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>این مقدار باید بزرگتر یا مساوی با {{ compared_value }} باشد.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>این مقدار باید با {{ compared_value_type }} {{ compared_value }} یکی باشد.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>این مقدار باید کمتر از {{ compared_value }} باشد.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>این مقدار باید کمتر یا مساوی با {{ compared_value }} باشد.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>این مقدار نباید با {{ compared_value }} برابر باشد.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>این مقدار نباید {{ compared_value_type }} {{ compared_value }} یکی باشد.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fi.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fi.xlf new file mode 100644 index 0000000..e439098 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fi.xlf @@ -0,0 +1,231 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Arvon tulee olla epätosi.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Arvon tulee olla tosi.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Arvon tulee olla tyyppiä {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Arvon tulee olla tyhjä.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Arvon tulee olla yksi annetuista vaihtoehdoista.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Sinun tulee valita vähintään {{ limit }} vaihtoehtoa.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Sinun tulee valitan enintään {{ limit }} vaihtoehtoa.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Yksi tai useampi annetuista arvoista on virheellinen.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Tässä kentässä ei odotettu.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Tämä kenttä puuttuu.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Annettu arvo ei ole kelvollinen päivämäärä.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Annettu arvo ei ole kelvollinen päivämäärä ja kellonaika.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Annettu arvo ei ole kelvollinen sähköpostiosoite.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Tiedostoa ei löydy.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Tiedostoa ei voida lukea.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Tiedostonkoko ({{ size }} {{ suffix }}) on liian iso. Suurin sallittu tiedostonkoko on {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Tiedostotyyppi ({{ type }}) on virheellinen. Sallittuja tiedostotyyppejä ovat {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Arvon tulee olla {{ limit }} tai vähemmän.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Liian pitkä syöte. Syöte saa olla enintään {{ limit }} merkkiä.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Arvon tulee olla {{ limit }} tai enemmän.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Liian lyhyt syöte. Syötteen tulee olla vähintään {{ limit }} merkkiä.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Kenttä ei voi olla tyhjä.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Syöte ei voi olla null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Syötteen tulee olla null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Virheellinen arvo.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Annettu arvo ei ole kelvollinen kellonaika.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Annettu arvo ei ole kelvollinen URL-osoite.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Kahden annetun arvon tulee olla samat.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Annettu tiedosto on liian iso. Suurin sallittu tiedostokoko on {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Tiedosto on liian iso.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Tiedoston siirto epäonnistui.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Tämän arvon tulee olla numero.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Tämä tiedosto ei ole kelvollinen kuva.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Tämä ei ole kelvollinen IP-osoite.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Tämä arvo ei ole kelvollinen kieli.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Tämä arvo ei ole kelvollinen kieli- ja alueasetus (locale).</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Tämä arvo ei ole kelvollinen maa.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Tämä arvo on jo käytetty.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Kuvan kokoa ei voitu tunnistaa.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Kuva on liian leveä ({{ width }}px). Sallittu maksimileveys on {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Kuva on liian kapea ({{ width }}px). Leveyden tulisi olla vähintään {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Kuva on liian korkea ({{ width }}px). Sallittu maksimikorkeus on {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Kuva on liian matala ({{ height }}px). Korkeuden tulisi olla vähintään {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Tämän arvon tulisi olla käyttäjän tämänhetkinen salasana.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Tämän arvon tulisi olla tasan yhden merkin pituinen.|Tämän arvon tulisi olla tasan {{ limit }} merkkiä pitkä.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Tiedosto ladattiin vain osittain.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Tiedostoa ei ladattu.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Väliaikaishakemistoa ei ole asetettu php.ini -tiedostoon.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Väliaikaistiedostoa ei voitu kirjoittaa levylle.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP-laajennoksen vuoksi tiedoston lataus epäonnistui.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Tässä ryhmässä tulisi olla yksi tai useampi elementti.|Tässä ryhmässä tulisi olla vähintään {{ limit }} elementtiä.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Tässä ryhmässä tulisi olla enintään yksi elementti.|Tässä ryhmässä tulisi olla enintään {{ limit }} elementtiä.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Tässä ryhmässä tulisi olla tasan yksi elementti.|Tässä ryhmässä tulisi olla enintään {{ limit }} elementtiä.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Virheellinen korttinumero.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Tätä korttityyppiä ei tueta tai korttinumero on virheellinen.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Virhe</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fr.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fr.xlf new file mode 100644 index 0000000..382acb9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fr.xlf @@ -0,0 +1,327 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Cette valeur doit être fausse.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Cette valeur doit être vraie.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Cette valeur doit être de type {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Cette valeur doit être vide.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Cette valeur doit être l'un des choix proposés.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Vous devez sélectionner au moins {{ limit }} choix.|Vous devez sélectionner au moins {{ limit }} choix.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Vous devez sélectionner au maximum {{ limit }} choix.|Vous devez sélectionner au maximum {{ limit }} choix.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Une ou plusieurs des valeurs soumises sont invalides.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Ce champ n'a pas été prévu.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Ce champ est manquant.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Cette valeur n'est pas une date valide.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Cette valeur n'est pas une date valide.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Cette valeur n'est pas une adresse email valide.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Le fichier n'a pas été trouvé.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Le fichier n'est pas lisible.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Le fichier est trop volumineux ({{ size }} {{ suffix }}). Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Le type du fichier est invalide ({{ type }}). Les types autorisés sont {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Cette valeur doit être inférieure ou égale à {{ limit }}.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Cette chaîne est trop longue. Elle doit avoir au maximum {{ limit }} caractère.|Cette chaîne est trop longue. Elle doit avoir au maximum {{ limit }} caractères.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Cette valeur doit être supérieure ou égale à {{ limit }}.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Cette chaîne est trop courte. Elle doit avoir au minimum {{ limit }} caractère.|Cette chaîne est trop courte. Elle doit avoir au minimum {{ limit }} caractères.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Cette valeur ne doit pas être vide.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Cette valeur ne doit pas être nulle.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Cette valeur doit être nulle.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Cette valeur n'est pas valide.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Cette valeur n'est pas une heure valide.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Cette valeur n'est pas une URL valide.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Les deux valeurs doivent être identiques.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Le fichier est trop volumineux. Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Le fichier est trop volumineux.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Le téléchargement de ce fichier est impossible.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Cette valeur doit être un nombre.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Ce fichier n'est pas une image valide.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Cette adresse IP n'est pas valide.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Cette langue n'est pas valide.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Ce paramètre régional n'est pas valide.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Ce pays n'est pas valide.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Cette valeur est déjà utilisée.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>La taille de l'image n'a pas pu être détectée.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>La largeur de l'image est trop grande ({{ width }}px). La largeur maximale autorisée est de {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>La largeur de l'image est trop petite ({{ width }}px). La largeur minimale attendue est de {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>La hauteur de l'image est trop grande ({{ height }}px). La hauteur maximale autorisée est de {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>La hauteur de l'image est trop petite ({{ height }}px). La hauteur minimale attendue est de {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Cette valeur doit être le mot de passe actuel de l'utilisateur.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Cette chaîne doit avoir exactement {{ limit }} caractère.|Cette chaîne doit avoir exactement {{ limit }} caractères.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Le fichier a été partiellement transféré.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Aucun fichier n'a été transféré.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Aucun répertoire temporaire n'a été configuré dans le php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Impossible d'écrire le fichier temporaire sur le disque.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Une extension PHP a empêché le transfert du fichier.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Cette collection doit contenir {{ limit }} élément ou plus.|Cette collection doit contenir {{ limit }} éléments ou plus.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Cette collection doit contenir {{ limit }} élément ou moins.|Cette collection doit contenir {{ limit }} éléments ou moins.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Cette collection doit contenir exactement {{ limit }} élément.|Cette collection doit contenir exactement {{ limit }} éléments.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Numéro de carte invalide.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Type de carte non supporté ou numéro invalide.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Le numéro IBAN (International Bank Account Number) saisi n'est pas valide.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Cette valeur n'est pas un code ISBN-10 valide.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Cette valeur n'est pas un code ISBN-13 valide.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Cette valeur n'est ni un code ISBN-10, ni un code ISBN-13 valide.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Cette valeur n'est pas un code ISSN valide.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Cette valeur n'est pas une devise valide.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Cette valeur doit être égale à {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Cette valeur doit être supérieure à {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Cette valeur doit être supérieure ou égale à {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Cette valeur doit être identique à {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Cette valeur doit être inférieure à {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Cette valeur doit être inférieure ou égale à {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Cette valeur ne doit pas être égale à {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Cette valeur ne doit pas être identique à {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Le rapport largeur/hauteur de l'image est trop grand ({{ ratio }}). Le rapport maximal autorisé est {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Le rapport largeur/hauteur de l'image est trop petit ({{ ratio }}). Le rapport minimal attendu est {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>L'image est carrée ({{ width }}x{{ height }}px). Les images carrées ne sont pas autorisées.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>L'image est au format paysage ({{ width }}x{{ height }}px). Les images au format paysage ne sont pas autorisées.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>L'image est au format portrait ({{ width }}x{{ height }}px). Les images au format portrait ne sont pas autorisées.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Un fichier vide n'est pas autorisé.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Le nom de domaine n'a pas pu être résolu.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Cette valeur ne correspond pas au jeu de caractères {{ charset }} attendu.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Ce n'est pas un code universel d'identification des banques (BIC) valide.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Erreur</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>Ceci n'est pas un UUID valide.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.gl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.gl.xlf new file mode 100644 index 0000000..ecb7155 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.gl.xlf @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Este valor debería ser falso.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Este valor debería ser verdadeiro.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Este valor debería ser de tipo {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Este valor debería estar baleiro.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>O valor seleccionado non é unha opción válida.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Debe seleccionar polo menos {{ limit }} opción.|Debe seleccionar polo menos {{ limit }} opcions.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Debe seleccionar como máximo {{ limit }} opción.|Debe seleccionar como máximo {{ limit }} opcions.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Un ou máis dos valores indicados non son válidos.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Este campo non era esperado.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Este campo falta.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Este valor non é unha data válida.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Este valor non é unha data e hora válidas.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Este valor non é unha dirección de correo electrónico válida.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Non se puido atopar o arquivo.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>O arquivo non se pode ler.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>O arquivo é demasiado grande ({{ size }} {{ suffix }}). O tamaño máximo permitido é {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>O tipo mime do arquivo non é válido ({{ type }}). Os tipos mime válidos son {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Este valor debería ser {{ limit }} ou menos.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Este valor é demasiado longo. Debería ter {{ limit }} carácter ou menos.|Este valor é demasiado longo. Debería ter {{ limit }} caracteres ou menos.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Este valor debería ser {{ limit }} ou máis.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Este valor é demasiado curto. Debería ter {{ limit }} carácter ou máis.|Este valor é demasiado corto. Debería ter {{ limit }} caracteres ou máis.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Este valor non debería estar baleiro.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Este valor non debería ser null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Este valor debería ser null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Este valor non é válido.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Este valor non é unha hora válida.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Este valor non é unha URL válida.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Os dous valores deberían ser iguais.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>O arquivo é demasiado grande. O tamaño máximo permitido é {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>O arquivo é demasiado grande.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>No se puido cargar o arquivo.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Este valor debería ser un número válido.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>O arquivo non é unha imaxe válida.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Isto non é unha dirección IP válida.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Este valor non é un idioma válido.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Este valor non é unha localización válida.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Este valor non é un país válido.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Este valor xa está a ser empregado.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Non se puido determinar o tamaño da imaxe.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>A largura da imaxe é demasiado grande ({{ width }}px). A largura máxima permitida son {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>A largura da imaxe é demasiado pequena ({{ width }}px). A largura mínima requerida son {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>A altura da imaxe é demasiado grande ({{ height }}px). A altura máxima permitida son {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>A altura da imaxe é demasiado pequena ({{ height }}px). A altura mínima requerida son {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Este valor debería ser a contrasinal actual do usuario.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Este valor debería ter exactamente {{ limit }} carácter.|Este valor debería ter exactamente {{ limit }} caracteres.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>O arquivo foi só subido parcialmente.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Non se subiu ningún arquivo.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Ningunha carpeta temporal foi configurada en php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Non se puido escribir o arquivo temporal no disco.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Unha extensión de PHP provocou que a subida fallara.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Esta colección debe conter {{ limit }} elemento ou máis.|Esta colección debe conter {{ limit }} elementos ou máis.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Esta colección debe conter {{ limit }} elemento ou menos.|Esta colección debe conter {{ limit }} elementos ou menos.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Esta colección debe conter exactamente {{ limit }} elemento.|Esta colección debe conter exactamente {{ limit }} elementos.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Número de tarxeta non válido.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Tipo de tarxeta non soportado ou número de tarxeta non válido.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Este valor non é un International Bank Account Number (IBAN) válido.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Este valor non é un ISBN-10 válido.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Este valor non é un ISBN-13 válido.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Este valor non é nin un ISBN-10 válido nin un ISBN-13 válido.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Este valor non é un ISSN válido.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Este valor non é unha moeda válida.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Este valor debería ser igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Este valor debería ser maior que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Este valor debería ser maior ou igual que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Este valor debería ser identico a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Este valor debería ser menor que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Este valor debería ser menor ou igual que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Este valor non debería ser igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Este valor non debería ser identico a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>A proporción da imaxe é demasiado grande ({{ ratio }}). A proporción máxima permitida é {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>A proporción da é demasiado pequena ({{ ratio }}). A proporción mínima permitida é {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>A imaxe é cadrada ({{ width }}x{{ height }}px). As imáxenes cadradas non están permitidas.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>A imaxe está orientada horizontalmente ({{ width }}x{{ height }}px). As imáxenes orientadas horizontalmente non están permitidas.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>A imaxe está orientada verticalmente ({{ width }}x{{ height }}px). As imáxenes orientadas verticalmente non están permitidas.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Non está permitido un arquivo baleiro.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Non se puido resolver o host.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>A codificación de caracteres para este valor debería ser {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Non é un Código de Identificación Bancaria (BIC) válido.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.he.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.he.xlf new file mode 100644 index 0000000..6510514 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.he.xlf @@ -0,0 +1,307 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>הערך צריך להיות שקר.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>הערך צריך להיות אמת.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>הערך צריך להיות מסוג {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>הערך צריך להיות ריק.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>הערך שבחרת אינו חוקי.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>אתה צריך לבחור לפחות {{ limit }} אפשרויות.|אתה צריך לבחור לפחות {{ limit }} אפשרויות.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>אתה צריך לבחור לכל היותר {{ limit }} אפשרויות.|אתה צריך לבחור לכל היותר {{ limit }} אפשרויות.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>אחד או יותר מהערכים אינו חוקי.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>שדה זה לא היה צפוי</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>שדה זה חסר.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>הערך אינו תאריך חוקי.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>הערך אינו תאריך ושעה חוקיים.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>כתובת המייל אינה תקינה.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>הקובץ לא נמצא.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>לא ניתן לקרוא את הקובץ.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>הקובץ גדול מדי ({{ size }} {{ suffix }}). הגודל המרבי המותר הוא {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>סוג MIME של הקובץ אינו חוקי ({{ type }}). מותרים סוגי MIME {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>הערך צריל להכיל {{ limit }} תווים לכל היותר.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>הערך ארוך מידי. הוא צריך להכיל {{ limit }} תווים לכל היותר.|הערך ארוך מידי. הוא צריך להכיל {{ limit }} תווים לכל היותר.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>הערך צריך להכיל {{ limit }} תווים לפחות.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>הערך קצר מידיץ הוא צריך להכיל {{ limit }} תווים לפחות.|הערך קצר מידיץ הוא צריך להכיל {{ limit }} תווים לפחות.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>הערך לא אמור להיות ריק.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>הערך לא אמור להיות ריק.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>הערך צריך להיות ריק.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>הערך אינו חוקי.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>הערך אינו זמן תקין.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>זאת אינה כתובת אתר תקינה.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>שני הערכים צריכים להיות שווים.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>הקובץ גדול מדי. הגודל המרבי המותר הוא {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>הקובץ גדול מדי.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>לא ניתן לעלות את הקובץ.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>הערך צריך להיות מספר חוקי.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>הקובץ הזה אינו תמונה תקינה.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>זו אינה כתובת IP חוקית.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>הערך אינו שפה חוקית.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>הערך אינו אזור תקף.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>הערך אינו ארץ חוקית.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>הערך כבר בשימוש.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>לא ניתן לקבוע את גודל התמונה.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>רוחב התמונה גדול מדי ({{ width }}px). הרוחב המקסימלי הוא {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>רוחב התמונה קטן מדי ({{ width }}px). הרוחב המינימלי הוא {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>גובה התמונה גדול מדי ({{ height }}px). הגובה המקסימלי הוא {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>גובה התמונה קטן מדי ({{ height }}px). הגובה המינימלי הוא {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>הערך צריך להיות סיסמת המשתמש הנוכחי.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>הערך צריך להיות בדיוק {{ limit }} תווים.|הערך צריך להיות בדיוק {{ limit }} תווים.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>הקובץ הועלה באופן חלקי.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>הקובץ לא הועלה.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>לא הוגדרה תיקייה זמנית ב php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>לא ניתן לכתוב קובץ זמני לדיסק.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>סיומת PHP גרם להעלאה להיכשל.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>האוסף אמור להכיל {{ limit }} אלמנטים או יותר.|האוסף אמור להכיל {{ limit }} אלמנטים או יותר.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>האוסף אמור להכיל {{ limit }} אלמנטים או פחות.|האוסף אמור להכיל {{ limit }} אלמנטים או פחות.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>האוסף צריך להכיל בדיוק {{ limit }} אלמנטים.|האוסף צריך להכיל בדיוק {{ limit }} אלמנטים.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>מספר הכרטיס אינו חוקי.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>סוג הכרטיס אינו נתמך או לא חוקי.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>This is not a valid International Bank Account Number (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>This value is not a valid ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>This value is not a valid ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>This value is neither a valid ISBN-10 nor a valid ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>This value is not a valid ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>This value is not a valid currency.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>This value should be equal to {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>This value should be greater than {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>This value should be greater than or equal to {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>This value should be less than {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>This value should be less than or equal to {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>This value should not be equal to {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>An empty file is not allowed.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hr.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hr.xlf new file mode 100644 index 0000000..126ef90 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hr.xlf @@ -0,0 +1,323 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Ova vrijednost treba biti netočna (false).</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Ova vrijednost treba biti točna (true).</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Ova vrijednost treba biti tipa {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Ova vrijednost treba biti prazna.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Ova vrijednost treba biti jedna od ponuđenih.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Izaberite barem {{ limit }} mogućnosti.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Izaberite najviše {{ limit }} mogućnosti.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Jedna ili više danih vrijednosti nije ispravna.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Ovo polje nije očekivalo.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Ovo polje nedostaje.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Ova vrijednost nije ispravan datum.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Ova vrijednost nije ispravan datum-vrijeme.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Ova vrijednost nije ispravna e-mail adresa.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Datoteka ne može biti pronađena.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Datoteka nije čitljiva.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veličina je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Mime tip datoteke nije ispravan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Ova vrijednost treba biti {{ limit }} ili manje.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Ova vrijednost je predugačka. Treba imati {{ limit }} znakova ili manje.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Ova vrijednost treba biti {{ limit }} ili više.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Ova vrijednost je prekratka. Treba imati {{ limit }} znakova ili više.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Ova vrijednost ne smije biti prazna.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Ova vrijednost ne smije biti null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Ova vrijednost treba biti null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Ova vrijednost nije ispravna.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Ova vrijednost nije ispravno vrijeme.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Ova vrijednost nije ispravan URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Obje vrijednosti trebaju biti jednake.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Ova datoteka je prevelika. Najveća dozvoljena veličina je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Ova datoteka je prevelika.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Ova datoteka ne može biti prenesena.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Ova vrijednost treba biti ispravan broj.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Ova datoteka nije ispravna slika.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Ovo nije ispravna IP adresa.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Ova vrijednost nije ispravan jezik.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Ova vrijednost nije ispravana regionalna oznaka.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Ova vrijednost nije ispravna zemlja.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Ova vrijednost je već iskorištena.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Veličina slike se ne može odrediti.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Širina slike je prevelika ({{ width }}px). Najveća dozvoljena širina je {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Širina slike je premala ({{ width }}px). Najmanja dozvoljena širina je {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Visina slike je prevelika ({{ height }}px). Najveća dozvoljena visina je {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Visina slike je premala ({{ height }}px). Najmanja dozvoljena visina je {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Ova vrijednost treba biti trenutna korisnička lozinka.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Ova vrijednost treba imati točno {{ limit }} znakova.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Datoteka je samo djelomično prenesena.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Niti jedna datoteka nije prenesena.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>U php.ini datoteci nije konfiguriran privremeni folder.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Ne mogu zapisati privremenu datoteku na disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Prijenos datoteke nije uspio zbog PHP ekstenzije.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Ova kolekcija treba sadržavati {{ limit }} ili više elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili više elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili više elemenata.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Ova kolekcija treba sadržavati točno {{ limit }} element.|Ova kolekcija treba sadržavati točno {{ limit }} elementa.|Ova kolekcija treba sadržavati točno {{ limit }} elemenata.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Neispravan broj kartice.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Neispravan broj kartice ili tip kartice nije podržan.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Ova vrijednost nije ispravan međunarodni broj bankovnog računa (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Ova vrijednost nije ispravan ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Ova vrijednost nije ispravan ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Ova vrijednost nije ispravan ISBN-10 niti ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Ova vrijednost nije ispravan ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Ova vrijednost nije ispravna valuta.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Ova vrijednost bi trebala biti jednaka {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Ova vrijednost bi trebala biti veća od {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Ova vrijednost bi trebala biti veća ili jednaka od {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ova vrijednost bi trebala biti {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Ova vrijednost bi trebala biti manja od {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Ova vrijednost bi trebala biti manja ili jednaka {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Ova vrijednost ne bi trebala biti {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ova vrijednost ne bi trebala biti {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Omjer slike je prevelik ({{ ratio }}). Dozvoljeni maksimalni omjer je {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Omjer slike je premali ({{ ratio }}). Minimalni očekivani omjer je {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Slika je kvadratnog oblika ({{ width }}x{{ height }}px). Kvadratne slike nisu dozvoljene.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Slika je orijentirana horizontalno ({{ width }}x{{ height }}px). Horizontalno orijentirane slike nisu dozvoljene.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Slika je orijentirana vertikalno ({{ width }}x{{ height }}px). Vertikalno orijentirane slike nisu dozvoljene.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Prazna datoteka nije dozvoljena.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Poslužitelj nije mogao biti razriješen.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Znakovne oznake vrijednosti ne odgovaraju očekivanom {{ charset }} skupu.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Ovo nije validan poslovni identifikacijski broj (BIC).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Greška</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hu.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hu.xlf new file mode 100644 index 0000000..1011d54 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hu.xlf @@ -0,0 +1,327 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Ennek az értéknek hamisnak kell lennie.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Ennek az értéknek igaznak kell lennie.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Ennek az értéknek {{ type }} típusúnak kell lennie.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Ennek az értéknek üresnek kell lennie.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>A választott érték érvénytelen.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Legalább {{ limit }} értéket kell kiválasztani.|Legalább {{ limit }} értéket kell kiválasztani.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Legfeljebb {{ limit }} értéket lehet kiválasztani.|Legfeljebb {{ limit }} értéket lehet kiválasztani.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>A megadott értékek közül legalább egy érvénytelen.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Nem várt mező.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Ez a mező hiányzik.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Ez az érték nem egy érvényes dátum.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Ez az érték nem egy érvényes időpont.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Ez az érték nem egy érvényes e-mail cím.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>A fájl nem található.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>A fájl nem olvasható.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>A fájl túl nagy ({{ size }} {{ suffix }}). A legnagyobb megengedett méret {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>A fájl MIME típusa érvénytelen ({{ type }}). Az engedélyezett MIME típusok: {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Ez az érték legfeljebb {{ limit }} lehet.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Ez az érték túl hosszú. Legfeljebb {{ limit }} karaktert tartalmazhat.|Ez az érték túl hosszú. Legfeljebb {{ limit }} karaktert tartalmazhat.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Ez az érték legalább {{ limit }} kell, hogy legyen.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Ez az érték túl rövid. Legalább {{ limit }} karaktert kell tartalmaznia.|Ez az érték túl rövid. Legalább {{ limit }} karaktert kell tartalmaznia.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Ez az érték nem lehet üres.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Ez az érték nem lehet null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Ennek az értéknek nullnak kell lennie.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Ez az érték nem érvényes.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Ez az érték nem egy érvényes időpont.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Ez az érték nem egy érvényes URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>A két értéknek azonosnak kell lennie.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>A fájl túl nagy. A megengedett maximális méret: {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>A fájl túl nagy.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>A fájl nem tölthető fel.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Ennek az értéknek érvényes számnak kell lennie.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Ez a fájl nem egy érvényes kép.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Ez az érték nem egy érvényes IP cím.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Ez az érték nem egy érvényes nyelv.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Ez az érték nem egy érvényes területi beállítás.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Ez az érték nem egy érvényes ország.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Ez az érték már használatban van.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>A kép méretét nem lehet megállapítani.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>A kép szélessége túl nagy ({{ width }}px). A megengedett legnagyobb szélesség {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>A kép szélessége túl kicsi ({{ width }}px). Az elvárt legkisebb szélesség {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>A kép magassága túl nagy ({{ height }}px). A megengedett legnagyobb magasság {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>A kép magassága túl kicsi ({{ height }}px). Az elvárt legkisebb magasság {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Ez az érték a felhasználó jelenlegi jelszavával kell megegyezzen.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Ennek az értéknek pontosan {{ limit }} karaktert kell tartalmaznia.|Ennek az értéknek pontosan {{ limit }} karaktert kell tartalmaznia.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>A fájl csak részben lett feltöltve.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Nem lett fájl feltöltve.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Nincs ideiglenes könyvtár beállítva a php.ini-ben.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Az ideiglenes fájl nem írható a lemezre.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Egy PHP bővítmény miatt a feltöltés nem sikerült.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Ennek a gyűjteménynek legalább {{ limit }} elemet kell tartalmaznia.|Ennek a gyűjteménynek legalább {{ limit }} elemet kell tartalmaznia.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Ez a gyűjtemény legfeljebb {{ limit }} elemet tartalmazhat.|Ez a gyűjtemény legfeljebb {{ limit }} elemet tartalmazhat.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Ennek a gyűjteménynek pontosan {{ limit }} elemet kell tartalmaznia.|Ennek a gyűjteménynek pontosan {{ limit }} elemet kell tartalmaznia.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Érvénytelen kártyaszám.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Nem támogatott kártyatípus vagy érvénytelen kártyaszám.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Érvénytelen nemzetközi bankszámlaszám (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Ez az érték nem egy érvényes ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Ez az érték nem egy érvényes ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Ez az érték nem egy érvényes ISBN-10 vagy ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Ez az érték nem egy érvényes ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Ez az érték nem egy érvényes pénznem.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Ez az érték legyen {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Ez az érték nagyobb legyen, mint {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Ez az érték nagyobb vagy egyenlő legyen, mint {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ez az érték ugyanolyan legyen, mint {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Ez az érték kisebb legyen, mint {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Ez az érték kisebb vagy egyenlő legyen, mint {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Ez az érték ne legyen {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ez az érték ne legyen ugyanolyan, mint {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>A képarány túl nagy ({{ ratio }}). A megengedett legnagyobb képarány {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>A képarány túl kicsi ({{ ratio }}). A megengedett legkisebb képarány {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>A kép négyzet alakú ({{ width }}x{{ height }}px). A négyzet alakú képek nem engedélyezettek.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>A kép fekvő tájolású ({{ width }}x{{ height }}px). A fekvő tájolású képek nem engedélyezettek.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>A kép álló tájolású ({{ width }}x{{ height }}px). Az álló tájolású képek nem engedélyezettek.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Üres fájl nem megengedett.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Az állomásnevet nem lehet feloldani.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Ez az érték nem az elvárt {{ charset }} karakterkódolást használja.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Érvénytelen nemzetközi bankazonosító kód (BIC/SWIFT).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Hiba</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>Érvénytelen egyedi azonosító (UUID).</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hy.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hy.xlf new file mode 100644 index 0000000..bc0dace --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hy.xlf @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Արժեքը պետք է լինի սխալ։</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Արժեքը պետք է լինի ճիշտ։</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Արժեքը պետք է լինի {{ type }} տեսակի։</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Արժեքը պետք է լինի դատարկ։</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Ձեր ընտրած արժեքը անվավեր ընտրություն է։</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Դուք պետք է ընտրեք ամենաքիչը {{ limit }} տարբերակներ։</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Դուք պետք է ընտրեք ոչ ավելի քան {{ limit }} տարբերակներ։</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Մեկ կամ ավելի տրված արժեքները անվավեր են։</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Այս դաշտը չի սպասվում։</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Այս դաշտը բացակայում է։</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Արժեքը սխալ ամսաթիվ է։</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Ամսաթվի և ժամանակի արժեքը անվավեր է։</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Անվավեր էլ֊փոստի արժեք։</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Նիշքը չի գտնվել։</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Նիշքը անընթեռնելի է։</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Նիշքը չափազանց մեծ է ({{ size }} {{ suffix }}): Մաքսիմալ թույլատրելի չափսը՝ {{ limit }} {{ suffix }}։</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>MIME-տեսակը անվավեր է է({{ type }}): Նիշքերի թույլատրելի MIME-տեսակներն են: {{ types }}։</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Արժեքը պետք է լինի {{ limit }} կամ փոքր։</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Արժեքը չափազանց երկար է: Պետք է լինի {{ limit }} կամ ավել սիմվոլներ։</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Արժեքը պետ է լինի {{ limit }} կամ շատ։</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Արժեքը չափազանց կարճ է: Պետք է լինի {{ limit }} կամ ավելի սիմվոլներ։</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Արժեքը չպետք է դատարկ լինի։</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Արժեքը չպետք է լինի null։</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Արժեքը պետք է լինի null։</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Անվավեր արժեք։</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Ժամանակի արժեքը անվավեր է։</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Արժեքը URL չէ։</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Երկու արժեքները պետք է նույնը լինեն։</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Նիշքը չափազանց մեծ է: Մաքսիմալ թույլատրելի չափսը {{ limit }} {{ suffix }} է։</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Նիշքը չափազանց մեծ է։</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Նիշքը չի կարող բեռնվել։</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Արժեքը պետք է լինի թիվ։</target> + </trans-unit> + <trans-unit id="36"> + <source>This value is not a valid country.</source> + <target>Արժեքը պետք է լինի երկիր։</target> + </trans-unit> + <trans-unit id="37"> + <source>This file is not a valid image.</source> + <target>Նիշքը նկարի վավեր ֆորմատ չէ։</target> + </trans-unit> + <trans-unit id="38"> + <source>This is not a valid IP address.</source> + <target>Արժեքը վավեր IP հասցե չէ։</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid language.</source> + <target>Արժեքը վավեր լեզու չէ։</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid locale.</source> + <target>Արժեքը չի հանդիսանում վավեր տեղայնացում։</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Այդ արժեքն արդեն օգտագործվում է։</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Նկարի չափսերը չստացվեց որոշել։</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Նկարի լայնությունը չափազանց մեծ է({{ width }}px). Մաքսիմալ չափն է {{ max_width }}px։</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Նկարի լայնությունը չափազանց փոքր է ({{ width }}px). Մինիմալ չափն է {{ min_ width }}px։</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Նկարի բարձրությունը չափազանց մեծ է ({{ height }}px). Մաքսիմալ չափն է {{ max_height }}px։</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Նկարի բարձրությունը չափազանց փոքր է ({{ height }}px). Մինիմալ չափն է {{ min_height }}px։</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Այս արժեքը պետք է լինի օգտագործողի ներկա ծածկագիրը։</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Այս արժեքը պետք է ունենա ճիշտ {{ limit }} սիմվոլներ։</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Նիշքի մասնակի բեռնման սխալ։</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Նիշքը չի բեռնվել։</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>php.ini նիշքում ժամանակավոր պանակ նշված չէ։</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Ժամանակավոր նիշքը հնարավոր չէ գրել սկավառակի վրա։</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP ֆորմատը դարձել է բեռնման չհաջողման պատճառ։</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Այս հավաքածուն պետք է պաուրակի {{ limit }} կամ ավելի տարրեր։|Այս հավելվածը պետք է պարունակի limit }} տարր կամ ավելին։|Այս հավաքածուն պետք է պարունակի {{ limit }} տարրերին կամ ավելի։</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Այս հավաքածուն պետք է պաուրակի {{ limit }} տարրեր կամ քիչ։|Այս հավաքածուն պետք է պաուրակի {{ limit }} տարր կամ քիչ։|Այս հավաքածուն պետք է պաուրակի {{ limit }} տարրեր կամ քիչ։</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Այս հավաքածուն պետք է պաուրակի ուղիղ {{ limit }} տարր։|Այս հավաքածուն պետք է պաուրակի ուղիղ {{ limit }} տարրեր։|Այս հավաքածուն պետք է պաուրակի {{ limit }} տարրեր։</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Քարտի սխալ համար:</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Չսպասարկվող կամ սխալ քարտի համար:</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Արժեքը վավեր միջազային բանկային հաշվի համար չէ (IBAN)։</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Արժեքը ունի անվավեր ISBN-10 ձևաչափ։</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Արժեքը ունի անվավեր ISBN-13 ձևաչափ։</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Արժեքը չի համապատասխանում ISBN-10 և ISBN-13 ձևաչափերին։</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Արժեքը չի համապաստասխանում ISSN ձևաչափին։</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Արժեքը վավեր տարադրամ չէ։</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Արժեքը պետք է լինի {{ compared_value }}։</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Արժեքը պետք է մեծ լինի, քան {{ compared_value }}։</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Արժեքը պետք է լինի հավասար կամ մեծ քան {{ compared_value }}։</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Արժեքը պետք է լինի ինչպես {{ compared_value_type }} {{ compared_value }}։</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Արժեքը պետք է լինի փոքր քան {{ compared_value }}։</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Արժեքը պետք է լինի փոքր կամ հավասար {{ compared_value }}։</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Արժեքը պետք է լինի հավասար {{ compared_value }}։</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Արժեքը պետք է լինի նունը {{ compared_value_type }} {{ compared_value }}:</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Պատկերի կողմերի հարաբերակցությունը խիստ մեծ է ({{ ratio }}). Մաքսիմալ հարաբերակցությունը՝ {{ max_ratio }}։</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Պատկերի կողմերի հարաբերակցությունը խիստ փոքր է ({{ ratio }}). Մինիմալ հարաբերակցությունը՝ {{ min_ratio }}։</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Պատկերը քառակուսի է({{ width }}x{{ height }}px)։ Քառակուսի նկարներ չեն թույլատրվում։</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Պատկերը ալբոմային ուղղվածության է({{ width }}x{{ height }}px)․ դա չի թույլատրվում։</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Պատկերը պորտրետային ուղղվածության է ({{ width }}x{{ height }}px)․ դա չի թույլատրվում։</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Դատարկ նիշք չի թույլատրվում։</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Հոսթի անունը հնարավոր չի պարզել:</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Արժեքը չի համընկնում {{ charset }} կոդավորման հետ:</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Սա վավեր Business Identifier Code (BIC) չէ։</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.id.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.id.xlf new file mode 100644 index 0000000..535bdac --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.id.xlf @@ -0,0 +1,323 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Nilai ini harus bernilai salah.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Nilai ini harus bernilai benar.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Nilai ini harus bertipe {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Nilai ini harus kosong.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Nilai yang dipilih tidak tepat.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Anda harus memilih paling tidak {{ limit }} pilihan.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Anda harus memilih paling banyak {{ limit }} pilihan.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Satu atau lebih nilai yang diberikan tidak sah.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Ruas ini tidak diharapkan.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Ruas ini hilang.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Nilai ini bukan merupakan tanggal yang sah.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Nilai ini bukan merupakan tanggal dan waktu yang sah.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Nilai ini bukan alamat surel yang sah.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Berkas tidak dapat ditemukan.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Berkas tidak dapat dibaca.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Ukuran berkas terlalu besar ({{ size }} {{ suffix }}). Ukuran maksimum yang diizinkan adalah {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Jenis berkas ({{ type }}) tidak sah. Jenis berkas yang diizinkan adalah {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Nilai ini harus {{ limit }} atau kurang.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Nilai ini terlalu panjang. Seharusnya {{ limit }} karakter atau kurang.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Nilai ini harus {{ limit }} atau lebih.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Nilai ini terlalu pendek. Seharusnya {{ limit }} karakter atau lebih.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Nilai ini tidak boleh kosong.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Nilai ini tidak boleh 'null'.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Nilai ini harus 'null'.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Nilai ini tidak sah.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Nilai ini bukan merupakan waktu yang sah.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Nilai ini bukan URL yang sah.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Isi keduanya harus sama.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Ukuran berkas terlalu besar. Ukuran maksimum yang diizinkan adalah {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Ukuran berkas terlalu besar.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Berkas tidak dapat diunggah.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Nilai ini harus angka yang sah.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Berkas ini tidak termasuk citra.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Ini bukan alamat IP yang sah.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Nilai ini bukan bahasa yang sah.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Nilai ini bukan lokal yang sah.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Nilai ini bukan negara yang sah.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Nilai ini sudah digunakan.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Ukuran dari citra tidak bisa dideteksi.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Lebar citra terlalu besar ({{ width }}px). Ukuran lebar maksimum adalah {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Lebar citra terlalu kecil ({{ width }}px). Ukuran lebar minimum yang diharapkan adalah {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Tinggi citra terlalu besar ({{ height }}px). Ukuran tinggi maksimum adalah {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Tinggi citra terlalu kecil ({{ height }}px). Ukuran tinggi minimum yang diharapkan adalah {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Nilai ini harus kata sandi pengguna saat ini.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Nilai ini harus memiliki tepat {{ limit }} karakter.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Berkas hanya terunggah sebagian.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Tidak ada berkas terunggah.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Direktori sementara tidak dikonfiguasi pada php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Tidak dapat menuliskan berkas sementara ke dalam media penyimpanan.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Sebuah ekstensi PHP menyebabkan kegagalan unggah.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Kumpulan ini harus memiliki {{ limit }} elemen atau lebih.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Kumpulan ini harus memiliki kurang dari {{ limit }} elemen.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Kumpulan ini harus memiliki tepat {{ limit }} elemen.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Nomor kartu tidak sah.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Jenis kartu tidak didukung atau nomor kartu tidak sah.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Ini bukan Nomor Rekening Bank Internasional (IBAN) yang sah.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Nilai ini bukan ISBN-10 yang sah.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Nilai ini bukan ISBN-13 yang sah.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Nilai ini bukan ISBN-10 maupun ISBN-13 yang sah.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Nilai ini bukan ISSN yang sah.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Nilai ini bukan mata uang yang sah.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Nilai ini seharusnya sama dengan {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Nilai ini seharusnya lebih dari {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Nilai ini seharusnya lebih dari atau sama dengan {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Nilai ini seharusnya identik dengan {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Nilai ini seharusnya kurang dari {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Nilai ini seharusnya kurang dari atau sama dengan {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Nilai ini seharusnya tidak sama dengan {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Nilai ini seharusnya tidak identik dengan {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Rasio citra terlalu besar ({{ ratio }}). Rasio maksimum yang diizinkan adalah {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Rasio citra terlalu kecil ({{ ratio }}). Rasio minimum yang diharapkan adalah {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Citra persegi ({{ width }}x{{ height }}px). Citra persegi tidak diizinkan.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Citra berorientasi lanskap ({{ width }}x{{ height }}px). Citra berorientasi lanskap tidak diizinkan.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Citra berorientasi potret ({{ width }}x{{ height }}px). Citra berorientasi potret tidak diizinkan.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Berkas kosong tidak diizinkan.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Host tidak dapat diselesaikan.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Nilai ini tidak memenuhi set karakter {{ charset }} yang diharapkan.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Ini bukan Business Identifier Code (BIC) yang sah.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Galat</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.it.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.it.xlf new file mode 100644 index 0000000..f195447 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.it.xlf @@ -0,0 +1,327 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Questo valore dovrebbe essere falso.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Questo valore dovrebbe essere vero.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Questo valore dovrebbe essere di tipo {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Questo valore dovrebbe essere vuoto.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Questo valore dovrebbe essere una delle opzioni disponibili.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Si dovrebbe selezionare almeno {{ limit }} opzione.|Si dovrebbero selezionare almeno {{ limit }} opzioni.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Si dovrebbe selezionare al massimo {{ limit }} opzione.|Si dovrebbero selezionare al massimo {{ limit }} opzioni.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Uno o più valori inseriti non sono validi.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Questo campo non è stato previsto.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Questo campo è mancante.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Questo valore non è una data valida.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Questo valore non è una data e ora valida.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Questo valore non è un indirizzo email valido.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Non è stato possibile trovare il file.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Il file non è leggibile.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Il file è troppo grande ({{ size }} {{ suffix }}). La dimensione massima consentita è {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Il mime type del file non è valido ({{ type }}). I tipi permessi sono {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Questo valore dovrebbe essere {{ limit }} o inferiore.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Questo valore è troppo lungo. Dovrebbe essere al massimo di {{ limit }} carattere.|Questo valore è troppo lungo. Dovrebbe essere al massimo di {{ limit }} caratteri.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Questo valore dovrebbe essere {{ limit }} o superiore.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Questo valore è troppo corto. Dovrebbe essere almeno di {{ limit }} carattere.|Questo valore è troppo corto. Dovrebbe essere almeno di {{ limit }} caratteri.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Questo valore non dovrebbe essere vuoto.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Questo valore non dovrebbe essere nullo.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Questo valore dovrebbe essere nullo.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Questo valore non è valido.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Questo valore non è un'ora valida.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Questo valore non è un URL valido.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>I due valori dovrebbero essere uguali.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Il file è troppo grande. La dimensione massima è {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Il file è troppo grande.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Il file non può essere caricato.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Questo valore dovrebbe essere un numero.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Questo file non è una immagine valida.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Questo valore non è un indirizzo IP valido.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Questo valore non è una lingua valida.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Questo valore non è una impostazione regionale valida.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Questo valore non è una nazione valida.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Questo valore è già stato utilizzato.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>La dimensione dell'immagine non può essere determinata.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>La larghezza dell'immagine è troppo grande ({{ width }}px). La larghezza massima è di {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>La larghezza dell'immagine è troppo piccola ({{ width }}px). La larghezza minima è di {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>L'altezza dell'immagine è troppo grande ({{ height }}px). L'altezza massima è di {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>L'altezza dell'immagine è troppo piccola ({{ height }}px). L'altezza minima è di {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Questo valore dovrebbe essere la password attuale dell'utente.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Questo valore dovrebbe contenere esattamente {{ limit }} carattere.|Questo valore dovrebbe contenere esattamente {{ limit }} caratteri.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Il file è stato caricato solo parzialmente.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Nessun file è stato caricato.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Nessuna cartella temporanea è stata configurata nel php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Impossibile scrivere il file temporaneo sul disco.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Un'estensione PHP ha causato il fallimento del caricamento.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Questa collezione dovrebbe contenere almeno {{ limit }} elemento.|Questa collezione dovrebbe contenere almeno {{ limit }} elementi.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Questa collezione dovrebbe contenere massimo {{ limit }} elemento.|Questa collezione dovrebbe contenere massimo {{ limit }} elementi.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Questa collezione dovrebbe contenere esattamente {{ limit }} elemento.|Questa collezione dovrebbe contenere esattamente {{ limit }} elementi.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Numero di carta non valido.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Tipo di carta non supportato o numero non valido.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Questo valore non è un IBAN (International Bank Account Number) valido.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Questo valore non è un codice ISBN-10 valido.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Questo valore non è un codice ISBN-13 valido.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Questo valore non è un codice ISBN-10 o ISBN-13 valido.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Questo valore non è un codice ISSN valido.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Questo valore non è una valuta valida.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Questo valore dovrebbe essere uguale a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Questo valore dovrebbe essere maggiore di {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Questo valore dovrebbe essere maggiore o uguale a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Questo valore dovrebbe essere identico a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Questo valore dovrebbe essere minore di {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Questo valore dovrebbe essere minore o uguale a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Questo valore dovrebbe essere diverso da {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Questo valore dovrebbe essere diverso da {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Il rapporto di aspetto dell'immagine è troppo grande ({{ ratio }}). Il rapporto massimo consentito è {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Il rapporto di aspetto dell'immagine è troppo piccolo ({{ ratio }}). Il rapporto minimo consentito è {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>L'immagine è quadrata ({{ width }}x{{ height }}px). Le immagini quadrate non sono consentite.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>L'immagine è orizzontale ({{ width }}x{{ height }}px). Le immagini orizzontali non sono consentite.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>L'immagine è verticale ({{ width }}x{{ height }}px). Le immagini verticali non sono consentite.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Un file vuoto non è consentito.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>L'host non può essere risolto.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Questo valore non corrisponde al charset {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Questo valore non è un codice BIC valido.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Errore</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>Questo non è un UUID valido.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ja.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ja.xlf new file mode 100644 index 0000000..0c61d15 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ja.xlf @@ -0,0 +1,331 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>falseでなければなりません。</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>trueでなければなりません。</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>型は{{ type }}でなければなりません。</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>空でなければなりません。</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>有効な選択肢ではありません。</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>{{ limit }}個以上選択してください。</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>{{ limit }}個以内で選択してください。</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>無効な選択肢が含まれています。</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>このフィールドは予期されていませんでした。</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>このフィールドは、欠落しています。</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>有効な日付ではありません。</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>有効な日時ではありません。</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>有効なメールアドレスではありません。</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>ファイルが見つかりません。</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>ファイルを読み込めません。</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>ファイルのサイズが大きすぎます({{ size }} {{ suffix }})。有効な最大サイズは{{ limit }} {{ suffix }}です。</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>ファイルのMIMEタイプが無効です({{ type }})。有効なMIMEタイプは{{ types }}です。</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>{{ limit }}以下でなければなりません。</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>値が長すぎます。{{ limit }}文字以内でなければなりません。</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>{{ limit }}以上でなければなりません。</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>値が短すぎます。{{ limit }}文字以上でなければなりません。</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>空であってはなりません。</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>nullであってはなりません。</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>nullでなければなりません。</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>有効な値ではありません。</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>有効な時刻ではありません。</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>有効なURLではありません。</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>2つの値が同じでなければなりません。</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>ファイルのサイズが大きすぎます。有効な最大サイズは{{ limit }} {{ suffix }}です。</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>ファイルのサイズが大きすぎます。</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>ファイルをアップロードできませんでした。</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>有効な数字ではありません。</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>ファイルが画像ではありません。</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>有効なIPアドレスではありません。</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>有効な言語名ではありません。</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>有効なロケールではありません。</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>有効な国名ではありません。</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>既に使用されています。</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>画像のサイズが検出できません。</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>画像の幅が大きすぎます({{ width }}ピクセル)。{{ max_width }}ピクセルまでにしてください。</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>画像の幅が小さすぎます({{ width }}ピクセル)。{{ min_width }}ピクセル以上にしてください。</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>画像の高さが大きすぎます({{ height }}ピクセル)。{{ max_height }}ピクセルまでにしてください。</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>画像の高さが小さすぎます({{ height }}ピクセル)。{{ min_height }}ピクセル以上にしてください。</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>ユーザーの現在のパスワードでなければなりません。</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>ちょうど{{ limit }}文字でなければなりません。</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>ファイルのアップロードは完全ではありません。</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>ファイルがアップロードされていません。</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>php.iniで一時フォルダが設定されていません。</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>一時ファイルをディスクに書き込むことができません。</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP拡張によってアップロードに失敗しました。</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>{{ limit }}個以上の要素を含んでなければいけません。</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>要素は{{ limit }}個までです。</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>要素はちょうど{{ limit }}個でなければなりません。</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>無効なカード番号です。</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>未対応のカード種類又は無効なカード番号です。</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>有効なIBANコードではありません。</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>有効なISBN-10コードではありません。</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>有効なISBN-13コードではありません。</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>有効なISBN-10コード又はISBN-13コードではありません。</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>有効なISSNコードではありません。</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>有効な貨幣ではありません。</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>{{ compared_value }}と等しくなければなりません。</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>{{ compared_value }}より大きくなければなりません。</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>{{ compared_value }}以上でなければなりません。</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>{{ compared_value_type }}としての{{ compared_value }}と等しくなければなりません。</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>{{ compared_value }}未満でなければなりません。</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>{{ compared_value }}以下でなければなりません。</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>{{ compared_value }}と等しくてはいけません。</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>{{ compared_value_type }}としての{{ compared_value }}と等しくてはいけません。</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>画像のアスペクト比が大きすぎます({{ ratio }})。{{ max_ratio }}までにしてください。</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>画像のアスペクト比が小さすぎます({{ ratio }})。{{ min_ratio }}以上にしてください。</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>画像が正方形になっています({{ width }}x{{ height }}ピクセル)。正方形の画像は許可されていません。</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>画像が横向きになっています({{ width }}x{{ height }}ピクセル)。横向きの画像は許可されていません。</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>画像が縦向きになっています({{ width }}x{{ height }}ピクセル)。縦向きの画像は許可されていません。</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>空のファイルは許可されていません。</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>ホストを解決できませんでした。</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>この値は予期される文字コード({{ charset }})と異なります。</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>有効なSWIFTコードではありません。</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>エラー</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>有効なUUIDではありません。</target> + </trans-unit> + <trans-unit id="84"> + <source>This value should be a multiple of {{ compared_value }}.</source> + <target>{{ compared_value }}の倍数でなければなりません。</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lb.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lb.xlf new file mode 100644 index 0000000..bdbc9da --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lb.xlf @@ -0,0 +1,327 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Dëse Wäert sollt falsch sinn.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Dëse Wäert sollt wouer sinn.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Dëse Wäert sollt vum Typ {{ type }} sinn.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Dëse Wäert sollt eidel sinn.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Dëse Wäert sollt enger vun de Wielméiglechkeeten entspriechen.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Et muss mindestens {{ limit }} Méiglechkeet ausgewielt ginn.|Et musse mindestens {{ limit }} Méiglechkeeten ausgewielt ginn.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Et dierf héchstens {{ limit }} Méiglechkeet ausgewielt ginn.|Et dierfen héchstens {{ limit }} Méiglechkeeten ausgewielt ginn.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Een oder méi vun de Wäerter ass ongëlteg.</target> + </trans-unit> + <trans-unit id="9"> + <source>The fields {{ fields }} were not expected.</source> + <target>D'Felder {{ fields }} goufen net erwaart.</target> + </trans-unit> + <trans-unit id="10"> + <source>The fields {{ fields }} are missing.</source> + <target>D'Felder {{ fields }} feelen.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Dëse Wäert entsprécht kenger gëlteger Datumsangab.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Dëse Wäert entsprécht kenger gëlteger Datums- an Zäitangab.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Dëse Wäert ass keng gëlteg Email-Adress.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>De Fichier gouf net fonnt.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>De Fichier ass net liesbar.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>De Fichier ass ze grouss ({{ size }} {{ suffix }}). Déi zougeloosse Maximalgréisst bedréit {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Den Typ vum Fichier ass ongëlteg ({{ type }}). Erlaabten Type sinn {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Dëse Wäert soll méi kleng oder gläich {{ limit }} sinn.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Dës Zeecheketten ass ze laang. Se sollt héchstens {{ limit }} Zeechen hunn.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Dëse Wäert sollt méi grouss oder gläich {{ limit }} sinn.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Dës Zeecheketten ass ze kuerz. Se sollt mindestens {{ limit }} Zeechen hunn.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Dëse Wäert sollt net eidel sinn.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Dëst sollt keen Null-Wäert sinn.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Dëst sollt keen Null-Wäert sinn.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Dëse Wäert ass net gëlteg.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Dëse Wäert entsprécht kenger gëlteger Zäitangab.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Dëse Wäert ass keng gëlteg URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Béid Wäerter sollten identesch sinn.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>De fichier ass ze grouss. Déi maximal Gréisst dierf {{ limit }} {{ suffix }} net depasséieren.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>De Fichier ass ze grouss.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>De Fichier konnt net eropgeluede ginn.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Dëse Wäert sollt eng gëlteg Zuel sinn.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Dëse Fichier ass kee gëltegt Bild.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Dëst ass keng gëlteg IP-Adress.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Dëse Wäert entsprécht kenger gëlteger Sprooch.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Dëse Wäert entsprécht kengem gëltege Gebittsschema.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Dëse Wäert entsprécht kengem gëltege Land.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Dëse Wäert gëtt scho benotzt.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>D'Gréisst vum Bild konnt net detektéiert ginn.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>D'Breet vum Bild ass ze grouss ({{ width }}px). Déi erlaabte maximal Breet ass {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>D'Breet vum Bild ass ze kleng ({{ width }}px). Déi minimal Breet ass {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>D'Héicht vum Bild ass ze grouss ({{ height }}px). Déi erlaabte maximal Héicht ass {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>D'Héicht vum Bild ass ze kleng ({{ height }}px). Déi minimal Héicht ass {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Dëse Wäert sollt dem aktuelle Benotzerpasswuert entspriechen.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Dëse Wäert sollt exakt {{ limit }} Buschtaf hunn.|Dëse Wäert sollt exakt {{ limit }} Buschtawen hunn.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>De Fichier gouf just deelweis eropgelueden.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Et gouf kee Fichier eropgelueden.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Et gouf keen temporären Dossier an der php.ini konfiguréiert oder den temporären Dossier existéiert net.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Den temporäre Fichier kann net gespäichert ginn.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Eng PHP-Erweiderung huet den Upload verhënnert.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Dës Sammlung sollt {{ limit }} oder méi Elementer hunn.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Dës Sammlung sollt {{ limit }} oder manner Elementer hunn.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Dës Sammlung sollt exakt {{ limit }} Element hunn.|Dës Sammlung sollt exakt {{ limit }} Elementer hunn.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Ongëlteg Kaartennummer.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Net ënnerstëtzte Kaartentyp oder ongëlteg Kaartennummer.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Dëst ass keng gëlteg IBAN-Kontonummer.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Dëse Wäert ass keng gëlteg ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Dëse Wäert ass keng gëlteg ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Dëse Wäert ass weder eng gëlteg ISBN-10 nach eng gëlteg ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Dëse Wäert ass keng gëlteg ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Dëse Wäert ass keng gëlteg Währung.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Dëse Wäert sollt {{ compared_value }} sinn.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Dëse Wäert sollt méi grouss wéi {{ compared_value }} sinn.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Dëse Wäert sollt méi grouss wéi oder gläich {{ compared_value }} sinn.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Dëse Wäert sollt identesch si mat {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Dëse Wäert sollt méi kleng wéi {{ compared_value }} sinn.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Dëse Wäert sollt méi kleng wéi oder gläich {{ compared_value }} sinn.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Dëse Wäert sollt net {{ compared_value }} sinn.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Dëse Wäert sollt net identesch si mat {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>D'Säiteverhältnis vum Bild ass ze grouss ({{ ratio }}). Den erlaabte Maximalwäert ass {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>D'Säiteverhältnis vum Bild ass ze kleng ({{ ratio }}). Den erwaarte Minimalwäert ass {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>D'Bild ass quadratesch ({{ width }}x{{ height }}px). Quadratesch Biller sinn net erlaabt.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>D'Bild ass am Queeschformat ({{ width }}x{{ height }}px). Biller am Queeschformat sinn net erlaabt.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>D'Bild ass am Héichformat ({{ width }}x{{ height }}px). Biller am Héichformat sinn net erlaabt.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>En eidele Fichier ass net erlaabt.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Den Host-Numm konnt net opgeléist ginn.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Dëse Wäert entsprécht net dem erwaarten Zeechesaz {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Dëst ass kee gëltege "Business Identifier Code" (BIC).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Feeler</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>Dëst ass keng gëlteg UUID.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lt.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lt.xlf new file mode 100644 index 0000000..60641b5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lt.xlf @@ -0,0 +1,311 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Reikšmė turi būti neigiama.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Reikšmė turi būti teigiama.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Šios reikšmės tipas turi būti {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Ši reikšmė turi būti tuščia.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Neteisingas pasirinkimas.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Turite pasirinkti bent {{ limit }} variantą.|Turite pasirinkti bent {{ limit }} variantus.|Turite pasirinkti bent {{ limit }} variantų.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Turite pasirinkti ne daugiau kaip {{ limit }} variantą.|Turite pasirinkti ne daugiau kaip {{ limit }} variantus.|Turite pasirinkti ne daugiau kaip {{ limit }} variantų.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Viena ar daugiau įvestų reikšmių yra netinkamos.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Nebuvo tikimasi Šis laukas.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Šiame lauke yra dingęs.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Ši reikšmė nėra data.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Ši reikšmė nera data ir laikas.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Ši reikšmė nėra tinkamas el. pašto adresas.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Byla nerasta.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Negalima nuskaityti bylos.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Byla yra per didelė ({{ size }} {{ suffix }}). Maksimalus dydis {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Netinkamas bylos tipas (mime type) ({{ type }}). Galimi bylų tipai {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Reikšmė turi būti {{ limit }} arba mažiau.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Per didelis simbolių skaičius. Turi susidaryti iš {{ limit }} arba mažiau simbolių.|Per didelis simbolių skaičius. Turi susidaryti iš {{ limit }} arba mažiau simbolių.|Per didelis simbolių skaičius. Turi susidaryti iš {{ limit }} arba mažiau simbolių.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Reikšmė turi būti {{ limit }} arba daugiau.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Per mažas simbolių skaičius. Turi susidaryti iš {{ limit }} arba daugiau simbolių.|Per mažas simbolių skaičius. Turi susidaryti iš {{ limit }} arba daugiau simbolių.|Per mažas simbolių skaičius. Turi susidaryti iš {{ limit }} arba daugiau simbolių.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Ši reikšmė negali būti tuščia.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Ši reikšmė negali būti null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Ši reikšmė turi būti null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Netinkama reikšmė.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Ši reikšmė nėra laikas.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Ši reikšmė nėra tinkamas interneto adresas.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Abi reikšmės turi būti identiškos.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Byla yra per didelė. Maksimalus dydis yra {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Byla per didelė.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Byla negali būti įkelta.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Ši reikšmė turi būti skaičius.</target> + </trans-unit> + <trans-unit id="36"> + <source>This value is not a valid country.</source> + <target>Ši reikšmė nėra tinkama šalis.</target> + </trans-unit> + <trans-unit id="37"> + <source>This file is not a valid image.</source> + <target>Byla nėra paveikslėlis.</target> + </trans-unit> + <trans-unit id="38"> + <source>This is not a valid IP address.</source> + <target>Ši reikšmė nėra tinkamas IP adresas.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid language.</source> + <target>Ši reikšmė nėra tinkama kalba.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid locale.</source> + <target>Ši reikšmė nėra tinkama lokalė.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Ši reikšmė jau yra naudojama.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Nepavyko nustatyti nuotraukos dydžio.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Nuotraukos plotis per didelis ({{ width }}px). Maksimalus leidžiamas plotis yra {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Nuotraukos plotis per mažas ({{ width }}px). Minimalus leidžiamas plotis yra {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Nuotraukos aukštis per didelis ({{ height }}px). Maksimalus leidžiamas aukštis yra {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Nuotraukos aukštis per mažas ({{ height }}px). Minimalus leidžiamas aukštis yra {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Ši reikšmė turi sutapti su dabartiniu naudotojo slaptažodžiu.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Ši reikšmė turi turėti lygiai {{ limit }} simbolį.|Ši reikšmė turi turėti lygiai {{ limit }} simbolius.|Ši reikšmė turi turėti lygiai {{ limit }} simbolių.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Failas buvo tik dalinai įkeltas.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Nebuvo įkelta jokių failų.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Nėra sukonfiguruoto jokio laikino katalogo php.ini faile.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Nepavyko išsaugoti laikino failo.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP plėtinys sutrukdė failo įkėlimą ir jis nepavyko.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Sąraše turi būti {{ limit }} arba daugiau įrašų.|Sąraše turi būti {{ limit }} arba daugiau įrašų.|Sąraše turi būti {{ limit }} arba daugiau įrašų.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Sąraše turi būti {{ limit }} arba mažiau įrašų.|Sąraše turi būti {{ limit }} arba mažiau įrašų.|Sąraše turi būti {{ limit }} arba mažiau įrašų.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Sąraše turi būti lygiai {{ limit }} įrašas.|Sąraše turi būti lygiai {{ limit }} įrašai.|Sąraše turi būti lygiai {{ limit }} įrašų.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Klaidingas kortelės numeris.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Kortelės tipas nepalaikomas arba klaidingas kortelės numeris.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Ši reišmė neatitinka tarptautinio banko sąskaitos numerio formato (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Ši reikšmė neatitinka ISBN-10 formato.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Ši reikšmė neatitinka ISBN-13 formato.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Ši reikšmė neatitinka nei ISBN-10, nei ISBN-13 formato.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Ši reišmė neatitinka ISSN formato.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Netinkamas valiutos formatas.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Ši reikšmė turi būti lygi {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Ši reikšmė turi būti didesnė už {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Ši reikšmė turi būti didesnė už arba lygi {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ši reikšmė turi būti identiška {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Ši reikšmė turi būti mažesnė už {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Ši reikšmė turi būti mažesnė už arba lygi {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Ši reikšmė neturi būti lygi {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ši reikšmė neturi būti identiška {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Nuotraukos santykis yra per didelis ({{ ratio }}). Didžiausias leistinas santykis yra {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Nuotraukos santykis yra per mažas ({{ ratio }}). Mažiausias leistinas santykis yra {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Nuotrauka yra kvadratinė ({{ width }}x{{ height }}px). Kvadratinės nuotraukos nėra leistinos.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Nuotrauka orientuota į plotį ({{ width }}x{{ height }}px). Nuotraukos orientuotos į plotį nėra leistinos.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Nuotrauka orientuota į aukštį ({{ width }}x{{ height }}px). Nuotraukos orientuotos į aukštį nėra leistinos.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Failas negali būti tuščias.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Klaida</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lv.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lv.xlf new file mode 100644 index 0000000..2ad19cd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lv.xlf @@ -0,0 +1,315 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Šai vērtībai ir jābūt nepatiesai.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Šai vērtībai ir jābūt patiesai.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Šīs vērtības tipam ir jābūt {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Šai vērtībai ir jābūt tukšai.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Vērtība, kuru jūs izvēlējāties nav derīga izvēle.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Jums nav jāveic izvēle.|Jums ir jāveic vismaz {{ limit }} izvēle.|Jums ir jāveic vismaz {{ limit }} izvēles.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Jums nav jāveic izvēle.|Jums ir jāveic ne vairāk kā {{ limit }} izvēle.|Jums ir jāveic ne vairāk kā {{ limit }} izvēles.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Viena vai vairākas no dotajām vērtībām ir nederīgas.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Šis lauks netika gaidīts.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Šis lauks ir pazudis.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Šī vērtība ir nederīgs datums.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Šī vērtība ir nederīgs datums un laiks</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Šī vērtība ir nederīga e-pasta adrese.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Fails nav atrasts.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Fails nav lasāms.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fails ir pārāk liels ({{ size }} {{ suffix }}). Atļautais maksimālais izmērs ir {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Faila mime tips nav derīgs ({{ type }}). Atļautie mime tipi ir {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Šai vērtībai ir jābūt ne vairāk kā {{ limit }}.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Šīs vērtības garums ir 0 rakstzīmju.|Šī vērtība ir pārāk gara. Tai būtu jābūt ne vairāk kā {{ limit }} rakstzīmei.|Šī vērtība ir pārāk gara. Tai būtu jābūt ne vairāk kā {{ limit }} rakstzīmēm.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Šai vērtībai ir jābūt ne mazāk kā {{ limit }}.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Šīs vērtības garums ir 0 rakstzīmju.|Šī vērtība ir pārāk īsa. Tai būtu jābūt ne mazāk kā {{ limit }} rakstzīmei.|Šī vērtība ir pārāk īsa. Tai būtu jābūt ne mazāk kā {{ limit }} rakstzīmēm.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Šai vērtībai nav jābūt tukšai.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Šai vērtībai nav jābūt null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Šai vērtībai ir jābūt null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Šī vērtība ir nederīga.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Šī vērtība ir nederīgs laiks.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Šī vērtība ir nederīgs URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Abām vērtībām jābūt vienādam.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fails ir pārāk liels. Atļautais maksimālais izmērs ir {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Fails ir pārāk liels.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Failu nevarēja augšupielādēt.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Šai vērtībai ir jābūt derīgam skaitlim.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Šis fails nav derīgs attēls.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Šī nav derīga IP adrese.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Šī vērtība nav derīga valoda.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Šī vērtība nav derīga lokalizācija.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Šī vērtība nav derīga valsts.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Šī vērtība jau tiek izmantota.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Nevar noteikt attēla izmēru.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Attēla platums ir pārāk liels ({{ width }}px). Atļautais maksimālais platums ir {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Attēla platums ir pārāk mazs ({{ width }}px). Minimālais sagaidāmais platums ir {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Attēla augstums ir pārāk liels ({{ height }}px). Atļautais maksimālais augstums ir {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Attēla augstums ir pārāk mazs ({{ height }}px). Minimālais sagaidāmais augstums ir {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Šai vērtībai ir jābūt lietotāja pašreizējai parolei.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Šīs vērtības garums ir 0 rakstzīmju.|Šai vērtībai ir jābūt tieši {{ limit }} rakstzīmei.|Šai vērtībai ir jābūt tieši {{ limit }} rakstzīmēm.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Fails bija tikai daļēji augšupielādēts.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Fails netika augšupielādēts.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Pagaidu mape php.ini failā nav nokonfigurēta.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Nevar ierakstīt pagaidu failu uz diska.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP paplašinājums izraisīja augšupielādes neizdošanos.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Šis krājums satur 0 elementu.|Šim krājumam jāsatur vismaz {{ limit }} elementu.|Šim krājumam jāsatur vismaz {{ limit }} elementus.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Šis krājums satur 0 elementu.|Šim krājumam jāsatur ne vairāk kā {{ limit }} elementu.|Šim krājumam jāsatur ne vairāk kā {{ limit }} elementus.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Šis krājums satur 0 elementu.|Šim krājumam jāsatur tieši {{ limit }} elementu.|Šim krājumam jāsatur tieši {{ limit }} elementus.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Nederīgs kartes numurs.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Neatbalstīts kartes tips vai nederīgs kartes numurs.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Šis nav derīgs starptautisks banku konta numurs (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Šī vērtība nav derīgs ISBN-10 numurs.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Šī vērtība nav derīgs ISBN-13 numurs</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Šī vērtība neatbilst ne derīgam ISBN-10 numuram, ne derīgm ISBN-13 numuram.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Šī vērtība nav derīgs ISSN numurs</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Šī vērtība nav derīga valūta</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Šai vērtībai ir jābūt vienādai ar {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Šai vērtībai ir jābūt lielākai par {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Šai vērtībai ir jābūt lielākai vai vienādai ar {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Šai vērtībai ir jābūt identiskai ar {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Šai vērtībai ir jābūt mazākai par {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>TŠai vērtībai ir jābūt mazākai vai vienādai ar {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Šai vērtībai ir jābūt vienādai ar {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Šai vērtībai nav jābūt identiskai ar {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Attēla attiecība ir pārāk liela ({{ ratio }}). Atļautā maksimālā attiecība ir {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Attēla attiecība ir pārāk maza ({{ ratio }}). Minimālā sagaidāmā attiecība ir {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Šis attēls ir kvadrāts ({{ width }}x{{ height }}px). Kvadrātveida attēli nav atļauti.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Attēls ir orientēts kā ainava ({{ width }}x{{ height }}px). Attēli, kas ir orientēti kā ainavas nav atļauti.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Attēls ir orientēts kā portrets ({{ width }}x{{ height }}px). Attēli, kas ir orientēti kā portreti nav atļauti.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Tukšs fails nav atļauts.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Resursdatora nosaukumu nevar atrisināt.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Šī vērtība neatbilst sagaidāmajai rakstzīmju kopai {{ charset }}.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.mn.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.mn.xlf new file mode 100644 index 0000000..4be2198 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.mn.xlf @@ -0,0 +1,151 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Энэ утга буруу байх ёстой.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Энэ утга үнэн байх ёстой.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Энэ утга {{ type }} -н төрөл байх ёстой.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Энэ утга хоосон байх ёстой.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Сонгосон утга буруу байна.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Хамгийн багадаа {{ limit }} утга сонгогдсон байх ёстой.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Хамгийн ихдээ {{ limit }} утга сонгогдох боломжтой.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Өгөгдсөн нэг эсвэл нэгээс олон утга буруу байна.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Энэ талбар нь хүлээгдэж байсан юм.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Энэ талбар нь алга болсон байна.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Энэ утга буруу date төрөл байна .</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Энэ утга буруу цаг төрөл байна.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>И-майл хаяг буруу байна.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Файл олдсонгүй.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Файл уншигдахуйц биш байна.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Файл хэтэрхий том байна ({{ size }} {{ suffix }}). Зөвшөөрөгдөх дээд хэмжээ {{ limit }} {{ suffix }} байна.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Файлын MIME-төрөл нь буруу байна ({{ type }}). Зөвшөөрөгдөх MIME-төрлүүд {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Энэ утга {{ limit }} юмуу эсвэл бага байна.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Энэ утга хэтэрхий урт байна. {{ limit }} тэмдэгтийн урттай юмуу эсвэл бага байна.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Энэ утга {{ limit }} юмуу эсвэл их байна.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Энэ утга хэтэрхий богино байна. {{ limit }} тэмдэгт эсвэл их байна.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Энэ утга хоосон байж болохгүй.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Энэ утга null байж болохгүй.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Энэ утга null байна.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Энэ утга буруу байна.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Энэ утга буруу цаг төрөл байна.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Энэ утга буруу URL байна .</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Хоёр утгууд ижил байх ёстой.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Файл хэтэрхий том байна. Зөвшөөрөгдөх дээд хэмжээ нь {{ limit }} {{ suffix }} байна.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Файл хэтэрхий том байна.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Файл upload хийгдсэнгүй.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Энэ утга зөвхөн тоо байна.</target> + </trans-unit> + <trans-unit id="36"> + <source>This value is not a valid country.</source> + <target>Энэ утга үнэн бодит улс биш байна.</target> + </trans-unit> + <trans-unit id="37"> + <source>This file is not a valid image.</source> + <target>Файл зураг биш байна.</target> + </trans-unit> + <trans-unit id="38"> + <source>This is not a valid IP address.</source> + <target>IP хаяг зөв биш байна.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid language.</source> + <target>Энэ утга үнэн зөв хэл биш байна .</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nb.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nb.xlf new file mode 100644 index 0000000..2505765 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nb.xlf @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Verdien må være usann.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Verdien må være sann.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Verdien skal ha typen {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Verdien skal være blank.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Den valgte verdien er ikke gyldig.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Du må velge minst {{ limit }} valg.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Du kan maks velge {{ limit }} valg.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>En eller flere av de oppgitte verdiene er ugyldige.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Dette feltet var ikke forventet.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Dette feltet mangler.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Verdien er ikke en gyldig dato.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Verdien er ikke en gyldig dato/tid.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Verdien er ikke en gyldig e-postadresse.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Filen kunne ikke finnes.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Filen er ikke lesbar.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Filen er for stor ({{ size }} {{ suffix }}). Tilatte maksimale størrelse {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Mimetypen av filen er ugyldig ({{ type }}). Tilatte mimetyper er {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Verdien må være {{ limit }} tegn lang eller mindre.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Verdien er for lang. Den må ha {{ limit }} tegn eller mindre.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Verdien må være {{ limit }} eller mer.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Verdien er for kort. Den må ha {{ limit }} tegn eller flere.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Verdien kan ikke være blank.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Verdien kan ikke være tom (null).</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Verdien skal være tom (null).</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Verdien er ugyldig.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Verdien er ikke en gyldig tid.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Verdien er ikke en gyldig URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Verdiene skal være identiske.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Filen er for stor. Den maksimale størrelsen er {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Filen er for stor.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Filen kunne ikke lastes opp.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Verdien skal være et gyldig tall.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Denne filen er ikke et gyldig bilde.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Dette er ikke en gyldig IP adresse.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Verdien er ikke et gyldig språk.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Verdien er ikke en gyldig lokalitet.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Verdien er ikke et gyldig navn på land.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Verdien er allerede brukt.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Bildestørrelsen kunne ikke oppdages.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Bildebredden er for stor ({{ width }} piksler). Tillatt maksimumsbredde er {{ max_width }} piksler.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Bildebredden er for liten ({{ width }} piksler). Forventet minimumsbredde er {{ min_width }} piksler.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Bildehøyden er for stor ({{ height }} piksler). Tillatt maksimumshøyde er {{ max_height }} piksler.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Bildehøyden er for liten ({{ height }} piksler). Forventet minimumshøyde er {{ min_height }} piksler.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Verdien skal være brukerens sitt nåværende passord.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Verdien skal være nøyaktig {{ limit }} tegn.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Filen var kun delvis opplastet.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Ingen fil var lastet opp.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Den midlertidige mappen (tmp) er ikke konfigurert i php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Kan ikke skrive midlertidig fil til disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>En PHP-utvidelse forårsaket en feil under opplasting.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Denne samlingen må inneholde {{ limit }} element eller flere.|Denne samlingen må inneholde {{ limit }} elementer eller flere.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Denne samlingen må inneholde {{ limit }} element eller færre.|Denne samlingen må inneholde {{ limit }} elementer eller færre.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Denne samlingen må inneholde nøyaktig {{ limit }} element.|Denne samlingen må inneholde nøyaktig {{ limit }} elementer.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Ugyldig kortnummer.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Korttypen er ikke støttet eller kortnummeret er ugyldig.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Dette er ikke et gyldig IBAN-nummer.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Verdien er ikke en gyldig ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Verdien er ikke en gyldig ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Verdien er hverken en gyldig ISBN-10 eller ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Verdien er ikke en gyldig ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Verdien er ikke gyldig valuta.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Verdien skal være lik {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Verdien skal være større enn {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Verdien skal være større enn eller lik {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Verdien skal være identisk med {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Verdien skal være mindre enn {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Verdien skal være mindre enn eller lik {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Verdien skal ikke være lik {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Verdien skal ikke være identisk med {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Bildeforholdet er for stort ({{ ratio }}). Tillatt bildeforhold er maks {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Bildeforholdet er for lite ({{ ratio }}). Forventet bildeforhold er minst {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Bildet er en kvadrat ({{ width }}x{{ height }}px). Kvadratiske bilder er ikke tillatt.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Bildet er i liggende retning ({{ width }}x{{ height }}px). Bilder i liggende retning er ikke tillatt.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Bildet er i stående retning ({{ width }}x{{ height }}px). Bilder i stående retning er ikke tillatt.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Tomme filer er ikke tilatt.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Vertsnavn kunne ikke løses.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Verdien samsvarer ikke med forventet tegnsett {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Dette er ikke en gyldig BIC.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nl.xlf new file mode 100644 index 0000000..bee0ab3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nl.xlf @@ -0,0 +1,323 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Deze waarde moet onwaar zijn.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Deze waarde moet waar zijn.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Deze waarde moet van het type {{ type }} zijn.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Deze waarde moet leeg zijn.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>De geselecteerde waarde is geen geldige optie.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Selecteer ten minste {{ limit }} optie.|Selecteer ten minste {{ limit }} opties.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Selecteer maximaal {{ limit }} optie.|Selecteer maximaal {{ limit }} opties.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Eén of meer van de ingegeven waarden zijn ongeldig.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Dit veld werd niet verwacht.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Dit veld ontbreekt.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Deze waarde is geen geldige datum.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Deze waarde is geen geldige datum en tijd.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Deze waarde is geen geldig e-mailadres.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Het bestand kon niet gevonden worden.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Het bestand is niet leesbaar.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Het bestand is te groot ({{ size }} {{ suffix }}). Toegestane maximum grootte is {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Het mime type van het bestand is ongeldig ({{ type }}). Toegestane mime types zijn {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Deze waarde moet {{ limit }} of minder zijn.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Deze waarde is te lang. Hij mag maximaal {{ limit }} teken bevatten.|Deze waarde is te lang. Hij mag maximaal {{ limit }} tekens bevatten.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Deze waarde moet {{ limit }} of meer zijn.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Deze waarde is te kort. Hij moet tenminste {{ limit }} teken bevatten.|Deze waarde is te kort. Hij moet tenminste {{ limit }} tekens bevatten.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Deze waarde mag niet leeg zijn.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Deze waarde mag niet null zijn.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Deze waarde moet null zijn.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Deze waarde is niet geldig.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Deze waarde is geen geldige tijd.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Deze waarde is geen geldige URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>De twee waarden moeten gelijk zijn.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Het bestand is te groot. Toegestane maximum grootte is {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Het bestand is te groot.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Het bestand kon niet worden geüpload.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Deze waarde moet een geldig getal zijn.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Dit bestand is geen geldige afbeelding.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Dit is geen geldig IP-adres.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Deze waarde is geen geldige taal.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Deze waarde is geen geldige locale.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Deze waarde is geen geldig land.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Deze waarde wordt al gebruikt.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>De grootte van de afbeelding kon niet bepaald worden.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>De afbeelding is te breed ({{ width }}px). De maximaal toegestane breedte is {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>De afbeelding is niet breed genoeg ({{ width }}px). De minimaal verwachte breedte is {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>De afbeelding is te hoog ({{ height }}px). De maximaal toegestane hoogte is {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>De afbeelding is niet hoog genoeg ({{ height }}px). De minimaal verwachte hoogte is {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Deze waarde moet het huidige wachtwoord van de gebruiker zijn.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Deze waarde moet exact {{ limit }} teken lang zijn.|Deze waarde moet exact {{ limit }} tekens lang zijn.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Het bestand is slechts gedeeltelijk geüpload.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Er is geen bestand geüpload.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Er is geen tijdelijke map geconfigureerd in php.ini, of de gespecificeerde map bestaat niet.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Kan het tijdelijke bestand niet wegschrijven op disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>De upload is mislukt vanwege een PHP-extensie.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Deze collectie moet {{ limit }} element of meer bevatten.|Deze collectie moet {{ limit }} elementen of meer bevatten.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Deze collectie moet {{ limit }} element of minder bevatten.|Deze collectie moet {{ limit }} elementen of minder bevatten.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Deze collectie moet exact {{ limit }} element bevatten.|Deze collectie moet exact {{ limit }} elementen bevatten.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Ongeldig creditcardnummer.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Niet-ondersteund type creditcard of ongeldig nummer.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Dit is geen geldig internationaal bankrekeningnummer (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Deze waarde is geen geldige ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Deze waarde is geen geldige ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Deze waarde is geen geldige ISBN-10 of ISBN-13 waarde.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Deze waarde is geen geldige ISSN waarde.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Deze waarde is geen geldige valuta.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Deze waarde moet gelijk zijn aan {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Deze waarde moet groter zijn dan {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Deze waarde moet groter dan of gelijk aan {{ compared_value }} zijn.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Deze waarde moet identiek zijn aan {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Deze waarde moet minder zijn dan {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Deze waarde moet minder dan of gelijk aan {{ compared_value }} zijn.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Deze waarde mag niet gelijk zijn aan {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Deze waarde mag niet identiek zijn aan {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>De afbeeldingsverhouding is te groot ({{ ratio }}). Maximale verhouding is {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>De afbeeldingsverhouding is te klein ({{ ratio }}). Minimale verhouding is {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>De afbeelding is vierkant ({{ width }}x{{ height }}px). Vierkante afbeeldingen zijn niet toegestaan.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>De afbeelding is liggend ({{ width }}x{{ height }}px). Liggende afbeeldingen zijn niet toegestaan.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>De afbeelding is staand ({{ width }}x{{ height }}px). Staande afbeeldingen zijn niet toegestaan.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Lege bestanden zijn niet toegestaan.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Deze waarde is niet in de verwachte tekencodering {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Dit is geen geldige bedrijfsidentificatiecode (BIC/SWIFT).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Fout</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>Dit is geen geldige UUID.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nn.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nn.xlf new file mode 100644 index 0000000..e588133 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nn.xlf @@ -0,0 +1,227 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Verdien skulle ha vore tom/nei.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Verdien skulla ha vore satt/ja.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Verdien må vere av typen {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Verdien skal vere blank.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Verdien du valde er ikkje gyldig.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Du må gjere minst {{ limit }} val.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Du kan maksimalt gjere {{ limit }} val.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Ein eller fleire av dei opplyste verdiane er ugyldige.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Dette feltet var ikke forventa.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Dette feltet mangler.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Verdien er ikkje ein gyldig dato.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Verdien er ikkje ein gyldig dato og tid.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Verdien er ikkje ei gyldig e-postadresse.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Fila er ikkje funnen.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Fila kan ikkje lesast.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fila er for stor ({{ size }} {{ suffix }}). Maksimal storleik er {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Mime-typen av fila er ugyldig ({{ type }}). Tillatne mime-typar er {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Verdien må vere {{ limit }} eller mindre.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Verdien er for lang. Den må vere {{ limit }} bokstavar eller mindre.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Verdien må vere {{ limit }} eller meir.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Verdien er for kort. Den må ha {{ limit }} teikn eller fleire.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Verdien kan ikkje vere blank.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Verdien kan ikkje vere tom (null).</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Verdien må vere tom (null).</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Verdien er ikkje gyldig.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Verdien er ikkje ei gyldig tidseining.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Verdien er ikkje ein gyldig URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Dei to verdiane må vere like.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fila er for stor. Den maksimale storleiken er {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Fila er for stor.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Fila kunne ikkje bli lasta opp.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Verdien må vere eit gyldig tal.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Fila er ikkje eit gyldig bilete.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Dette er ikkje ei gyldig IP-adresse.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Verdien er ikkje eit gyldig språk.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Verdien er ikkje ein gyldig lokalitet (språk/region).</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Verdien er ikkje eit gyldig land.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Verdien er allereie i bruk.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Storleiken på biletet kunne ikkje oppdagast.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Biletbreidda er for stor, ({{ width }} pikslar). Tillaten maksimumsbreidde er {{ max_width }} pikslar.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Biletbreidda er for liten, ({{ width }} pikslar). Forventa minimumsbreidde er {{ min_width }} pikslar.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Bilethøgda er for stor, ({{ height }} pikslar). Tillaten maksimumshøgde er {{ max_height }} pikslar.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Billethøgda er for låg, ({{ height }} pikslar). Forventa minimumshøgde er {{ min_height }} pikslar.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Verdien må vere brukaren sitt noverande passord.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Verdien må vere nøyaktig {{ limit }} teikn.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Fila vart berre delvis lasta opp.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Inga fil vart lasta opp.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Førebels mappe (tmp) er ikkje konfigurert i php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Kan ikkje skrive førebels fil til disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Ei PHP-udviding forårsaka feil under opplasting.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Denne samlinga må innehalde {{ limit }} element eller meir.|Denne samlinga må innehalde {{ limit }} element eller meir.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Denne samlinga må innehalde {{ limit }} element eller færre.|Denne samlinga må innehalde {{ limit }} element eller færre.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Denne samlinga må innehalde nøyaktig {{ limit }} element.|Denne samlinga må innehalde nøyaktig {{ limit }} element.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Ugyldig kortnummer.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Korttypen er ikkje støtta, eller kortnummeret er ugyldig.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.no.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.no.xlf new file mode 100644 index 0000000..2505765 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.no.xlf @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Verdien må være usann.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Verdien må være sann.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Verdien skal ha typen {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Verdien skal være blank.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Den valgte verdien er ikke gyldig.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Du må velge minst {{ limit }} valg.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Du kan maks velge {{ limit }} valg.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>En eller flere av de oppgitte verdiene er ugyldige.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Dette feltet var ikke forventet.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Dette feltet mangler.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Verdien er ikke en gyldig dato.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Verdien er ikke en gyldig dato/tid.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Verdien er ikke en gyldig e-postadresse.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Filen kunne ikke finnes.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Filen er ikke lesbar.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Filen er for stor ({{ size }} {{ suffix }}). Tilatte maksimale størrelse {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Mimetypen av filen er ugyldig ({{ type }}). Tilatte mimetyper er {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Verdien må være {{ limit }} tegn lang eller mindre.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Verdien er for lang. Den må ha {{ limit }} tegn eller mindre.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Verdien må være {{ limit }} eller mer.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Verdien er for kort. Den må ha {{ limit }} tegn eller flere.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Verdien kan ikke være blank.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Verdien kan ikke være tom (null).</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Verdien skal være tom (null).</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Verdien er ugyldig.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Verdien er ikke en gyldig tid.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Verdien er ikke en gyldig URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Verdiene skal være identiske.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Filen er for stor. Den maksimale størrelsen er {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Filen er for stor.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Filen kunne ikke lastes opp.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Verdien skal være et gyldig tall.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Denne filen er ikke et gyldig bilde.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Dette er ikke en gyldig IP adresse.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Verdien er ikke et gyldig språk.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Verdien er ikke en gyldig lokalitet.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Verdien er ikke et gyldig navn på land.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Verdien er allerede brukt.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Bildestørrelsen kunne ikke oppdages.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Bildebredden er for stor ({{ width }} piksler). Tillatt maksimumsbredde er {{ max_width }} piksler.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Bildebredden er for liten ({{ width }} piksler). Forventet minimumsbredde er {{ min_width }} piksler.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Bildehøyden er for stor ({{ height }} piksler). Tillatt maksimumshøyde er {{ max_height }} piksler.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Bildehøyden er for liten ({{ height }} piksler). Forventet minimumshøyde er {{ min_height }} piksler.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Verdien skal være brukerens sitt nåværende passord.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Verdien skal være nøyaktig {{ limit }} tegn.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Filen var kun delvis opplastet.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Ingen fil var lastet opp.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Den midlertidige mappen (tmp) er ikke konfigurert i php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Kan ikke skrive midlertidig fil til disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>En PHP-utvidelse forårsaket en feil under opplasting.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Denne samlingen må inneholde {{ limit }} element eller flere.|Denne samlingen må inneholde {{ limit }} elementer eller flere.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Denne samlingen må inneholde {{ limit }} element eller færre.|Denne samlingen må inneholde {{ limit }} elementer eller færre.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Denne samlingen må inneholde nøyaktig {{ limit }} element.|Denne samlingen må inneholde nøyaktig {{ limit }} elementer.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Ugyldig kortnummer.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Korttypen er ikke støttet eller kortnummeret er ugyldig.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Dette er ikke et gyldig IBAN-nummer.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Verdien er ikke en gyldig ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Verdien er ikke en gyldig ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Verdien er hverken en gyldig ISBN-10 eller ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Verdien er ikke en gyldig ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Verdien er ikke gyldig valuta.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Verdien skal være lik {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Verdien skal være større enn {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Verdien skal være større enn eller lik {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Verdien skal være identisk med {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Verdien skal være mindre enn {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Verdien skal være mindre enn eller lik {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Verdien skal ikke være lik {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Verdien skal ikke være identisk med {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Bildeforholdet er for stort ({{ ratio }}). Tillatt bildeforhold er maks {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Bildeforholdet er for lite ({{ ratio }}). Forventet bildeforhold er minst {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Bildet er en kvadrat ({{ width }}x{{ height }}px). Kvadratiske bilder er ikke tillatt.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Bildet er i liggende retning ({{ width }}x{{ height }}px). Bilder i liggende retning er ikke tillatt.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Bildet er i stående retning ({{ width }}x{{ height }}px). Bilder i stående retning er ikke tillatt.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Tomme filer er ikke tilatt.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Vertsnavn kunne ikke løses.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Verdien samsvarer ikke med forventet tegnsett {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Dette er ikke en gyldig BIC.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pl.xlf new file mode 100644 index 0000000..e7ad1ec --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pl.xlf @@ -0,0 +1,331 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Ta wartość powinna być fałszem.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Ta wartość powinna być prawdą.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Ta wartość powinna być typu {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Ta wartość powinna być pusta.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Ta wartość powinna być jedną z podanych opcji.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Powinieneś wybrać co najmniej {{ limit }} opcję.|Powinieneś wybrać co najmniej {{ limit }} opcje.|Powinieneś wybrać co najmniej {{ limit }} opcji.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Powinieneś wybrać maksymalnie {{ limit }} opcję.|Powinieneś wybrać maksymalnie {{ limit }} opcje.|Powinieneś wybrać maksymalnie {{ limit }} opcji.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Jedna lub więcej z podanych wartości jest nieprawidłowa.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Tego pola się nie spodziewano.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Tego pola brakuje.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Ta wartość nie jest prawidłową datą.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Ta wartość nie jest prawidłową datą i czasem.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Ta wartość nie jest prawidłowym adresem email.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Plik nie mógł zostać odnaleziony.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Nie można odczytać pliku.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Plik jest za duży ({{ size }} {{ suffix }}). Maksymalny dozwolony rozmiar to {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Nieprawidłowy typ mime pliku ({{ type }}). Dozwolone typy mime to {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Ta wartość powinna wynosić {{ limit }} lub mniej.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Ta wartość jest zbyt długa. Powinna mieć {{ limit }} lub mniej znaków.|Ta wartość jest zbyt długa. Powinna mieć {{ limit }} lub mniej znaków.|Ta wartość jest zbyt długa. Powinna mieć {{ limit }} lub mniej znaków.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Ta wartość powinna wynosić {{ limit }} lub więcej.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub więcej znaków.|Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub więcej znaków.|Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub więcej znaków.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Ta wartość nie powinna być pusta.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Ta wartość nie powinna być nullem.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Ta wartość powinna być nullem.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Ta wartość jest nieprawidłowa.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Ta wartość nie jest prawidłowym czasem.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Ta wartość nie jest prawidłowym adresem URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Obie wartości powinny być równe.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Plik jest za duży. Maksymalny dozwolony rozmiar to {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Plik jest za duży.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Plik nie mógł być wgrany.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Ta wartość powinna być prawidłową liczbą.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Ten plik nie jest obrazem.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>To nie jest prawidłowy adres IP.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Ta wartość nie jest prawidłowym językiem.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Ta wartość nie jest prawidłową lokalizacją.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Ta wartość nie jest prawidłową nazwą kraju.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Ta wartość jest już wykorzystywana.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Nie można wykryć rozmiaru obrazka.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Szerokość obrazka jest zbyt duża ({{ width }}px). Maksymalna dopuszczalna szerokość to {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Szerokość obrazka jest zbyt mała ({{ width }}px). Oczekiwana minimalna szerokość to {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Wysokość obrazka jest zbyt duża ({{ height }}px). Maksymalna dopuszczalna wysokość to {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Wysokość obrazka jest zbyt mała ({{ height }}px). Oczekiwana minimalna wysokość to {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Ta wartość powinna być aktualnym hasłem użytkownika.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Ta wartość powinna mieć dokładnie {{ limit }} znak.|Ta wartość powinna mieć dokładnie {{ limit }} znaki.|Ta wartość powinna mieć dokładnie {{ limit }} znaków.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Plik został wgrany tylko częściowo.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Żaden plik nie został wgrany.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Nie skonfigurowano folderu tymczasowego w php.ini, lub skonfigurowany folder nie istnieje.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Nie można zapisać pliku tymczasowego na dysku.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Rozszerzenie PHP spowodowało błąd podczas wgrywania.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Ten zbiór powinien zawierać {{ limit }} lub więcej elementów.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Ten zbiór powinien zawierać {{ limit }} lub mniej elementów.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Ten zbiór powinien zawierać dokładnie {{ limit }} element.|Ten zbiór powinien zawierać dokładnie {{ limit }} elementy.|Ten zbiór powinien zawierać dokładnie {{ limit }} elementów.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Nieprawidłowy numer karty.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Nieobsługiwany rodzaj karty lub nieprawidłowy numer karty.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Nieprawidłowy międzynarodowy numer rachunku bankowego (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Ta wartość nie jest prawidłowym numerem ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Ta wartość nie jest prawidłowym numerem ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Ta wartość nie jest prawidłowym numerem ISBN-10 ani ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Ta wartość nie jest prawidłowym numerem ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Ta wartość nie jest prawidłową walutą.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Ta wartość powinna być równa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Ta wartość powinna być większa niż {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Ta wartość powinna być większa bądź równa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ta wartość powinna być identycznego typu {{ compared_value_type }} oraz wartości {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Ta wartość powinna być mniejsza niż {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Ta wartość powinna być mniejsza bądź równa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Ta wartość nie powinna być równa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ta wartość nie powinna być identycznego typu {{ compared_value_type }} oraz wartości {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Proporcje obrazu są zbyt duże ({{ ratio }}). Maksymalne proporcje to {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Proporcje obrazu są zbyt małe ({{ ratio }}). Minimalne proporcje to {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Obraz jest kwadratem ({{ width }}x{{ height }}px). Kwadratowe obrazy nie są akceptowane.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Obraz jest panoramiczny ({{ width }}x{{ height }}px). Panoramiczne zdjęcia nie są akceptowane.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Obraz jest portretowy ({{ width }}x{{ height }}px). Portretowe zdjęcia nie są akceptowane.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Plik nie może być pusty.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Nazwa hosta nie została rozpoznana.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Ta wartość nie pasuje do oczekiwanego zestawu znaków {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Ta wartość nie jest poprawnym kodem BIC (Business Identifier Code).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Błąd</target> + </trans-unit> + <trans-unit id="83"> + <source>This is not a valid UUID.</source> + <target>To nie jest poprawne UUID.</target> + </trans-unit> + <trans-unit id="84"> + <source>This value should be a multiple of {{ compared_value }}.</source> + <target>Ta wartość powinna być wielokrotnością {{ compared_value }}.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt.xlf new file mode 100644 index 0000000..0561c04 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt.xlf @@ -0,0 +1,311 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Este valor deveria ser falso.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Este valor deveria ser verdadeiro.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Este valor deveria ser do tipo {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Este valor deveria ser vazio.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>O valor selecionado não é uma opção válida.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Você deveria selecionar {{ limit }} opção no mínimo.|Você deveria selecionar {{ limit }} opções no mínimo.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Você deve selecionar, no máximo {{ limit }} opção.|Você deve selecionar, no máximo {{ limit }} opções.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Um ou mais dos valores introduzidos não são válidos.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Este campo não era esperado.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Este campo está faltando.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Este valor não é uma data válida.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Este valor não é uma data-hora válida.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Este valor não é um endereço de e-mail válido.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>O arquivo não pôde ser encontrado.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>O arquivo não pôde ser lido.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>O arquivo é muito grande ({{ size }} {{ suffix }}). O tamanho máximo permitido é de {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>O tipo mime do arquivo é inválido ({{ type }}). Os tipos mime permitidos são {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Este valor deveria ser {{ limit }} ou menor.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>O valor é muito longo. Deveria ter {{ limit }} caracteres ou menos.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Este valor deveria ser {{ limit }} ou mais.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>O valor é muito curto. Deveria de ter {{ limit }} caractere ou mais.|O valor é muito curto. Deveria de ter {{ limit }} caracteres ou mais.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Este valor não deveria ser branco/vazio.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Este valor não deveria ser nulo.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Este valor deveria ser nulo.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Este valor não é válido.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Este valor não é uma hora válida.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Este valor não é um URL válido.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Os dois valores deveriam ser iguais.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>O arquivo é muito grande. O tamanho máximo permitido é de {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>O ficheiro é muito grande.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Não foi possível carregar o ficheiro.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Este valor deveria de ser um número válido.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Este ficheiro não é uma imagem.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Este endereço de IP não é válido.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Este valor não é uma linguagem válida.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Este valor não é um 'locale' válido.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Este valor não é um País válido.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Este valor já está a ser usado.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>O tamanho da imagem não foi detetado.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>A largura da imagem ({{ width }}px) é muito grande. A largura máxima da imagem é: {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>A largura da imagem ({{ width }}px) é muito pequena. A largura miníma da imagem é de: {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>A altura da imagem ({{ height }}px) é muito grande. A altura máxima da imagem é de: {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>A altura da imagem ({{ height }}px) é muito pequena. A altura miníma da imagem é de: {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Este valor deveria de ser a password atual do utilizador.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Este valor tem de ter exatamente {{ limit }} carateres.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Só foi enviado parte do ficheiro.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Nenhum ficheiro foi enviado.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Não existe nenhum directório temporária configurado no ficheiro php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Não foi possível escrever ficheiros temporários no disco.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Uma extensão PHP causou a falha no envio.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Esta coleção deve conter {{ limit }} elemento ou mais.|Esta coleção deve conter {{ limit }} elementos ou mais.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Esta coleção deve conter {{ limit }} elemento ou menos.|Esta coleção deve conter {{ limit }} elementos ou menos.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Esta coleção deve conter exatamente {{ limit }} elemento.|Esta coleção deve conter exatamente {{ limit }} elementos.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Número de cartão inválido.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Tipo de cartão não suportado ou número de cartão inválido.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Este não é um Número Internacional de Conta Bancária (IBAN) válido.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Este valor não é um ISBN-10 válido.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Este valor não é um ISBN-13 válido.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Este valor não é um ISBN-10 ou ISBN-13 válido.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Este valor não é um ISSN válido.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Este não é um valor monetário válido.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Este valor deve ser igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Este valor deve ser superior a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Este valor deve ser igual ou superior a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Este valor deve ser idêntico a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Este valor deve ser inferior a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Este valor deve ser igual ou inferior a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Este valor não deve ser igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>O formato da imagem é muito grande ({{ ratio }}). O formato máximo é {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>O formato da imagem é muito pequeno ({{ ratio }}). O formato mínimo esperado é {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>A imagem é um quadrado ({{ width }}x{{ height }}px). Imagens quadradas não são permitidas.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>A imagem está orientada à paisagem ({{ width }}x{{ height }}px). Imagens orientadas à paisagem não são permitidas.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>A imagem está orientada ao retrato ({{ width }}x{{ height }}px). Imagens orientadas ao retrato não são permitidas.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Ficheiro vazio não é permitido.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Erro</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf new file mode 100644 index 0000000..b617062 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Este valor deve ser falso.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Este valor deve ser verdadeiro.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Este valor deve ser do tipo {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Este valor deve ser vazio.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>O valor selecionado não é uma opção válida.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Você deve selecionar, no mínimo, {{ limit }} opção.|Você deve selecionar, no mínimo, {{ limit }} opções.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Você deve selecionar, no máximo, {{ limit }} opção.|Você deve selecionar, no máximo, {{ limit }} opções.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Um ou mais valores informados são inválidos.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Este campo não era esperado.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Este campo está ausente.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Este valor não é uma data válida.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Este valor não é uma data e hora válida.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Este valor não é um endereço de e-mail válido.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>O arquivo não foi encontrado.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>O arquivo não pode ser lido.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>O arquivo é muito grande ({{ size }} {{ suffix }}). O tamanho máximo permitido é {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>O tipo mime do arquivo é inválido ({{ type }}). Os tipos mime permitidos são {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Este valor deve ser {{ limit }} ou menos.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Este valor é muito longo. Deve ter {{ limit }} caractere ou menos.|Este valor é muito longo. Deve ter {{ limit }} caracteres ou menos.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Este valor deve ser {{ limit }} ou mais.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Este valor é muito curto. Deve ter {{ limit }} caractere ou mais.|Este valor é muito curto. Deve ter {{ limit }} caracteres ou mais.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Este valor não deve ser vazio.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Este valor não deve ser nulo.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Este valor deve ser nulo.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Este valor não é válido.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Este valor não é uma hora válida.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Este valor não é uma URL válida.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Os dois valores devem ser iguais.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>O arquivo é muito grande. O tamanho máximo permitido é de {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>O arquivo é muito grande.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>O arquivo não pode ser enviado.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Este valor deve ser um número válido.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Este arquivo não é uma imagem válida.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Este não é um endereço de IP válido.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Este valor não é um idioma válido.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Este valor não é uma localidade válida.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Este valor não é um país válido.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Este valor já está sendo usado.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>O tamanho da imagem não pode ser detectado.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>A largura da imagem é muito grande ({{ width }}px). A largura máxima permitida é de {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>A largura da imagem é muito pequena ({{ width }}px). A largura mínima esperada é de {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>A altura da imagem é muito grande ({{ height }}px). A altura máxima permitida é de {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>A altura da imagem é muito pequena ({{ height }}px). A altura mínima esperada é de {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Este valor deve ser a senha atual do usuário.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Este valor deve ter exatamente {{ limit }} caractere.|Este valor deve ter exatamente {{ limit }} caracteres.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>O arquivo foi enviado apenas parcialmente.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Nenhum arquivo foi enviado.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Nenhum diretório temporário foi configurado no php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Não foi possível escrever o arquivo temporário no disco.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Uma extensão PHP fez com que o envio falhasse.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Esta coleção deve conter {{ limit }} elemento ou mais.|Esta coleção deve conter {{ limit }} elementos ou mais.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Esta coleção deve conter {{ limit }} elemento ou menos.|Esta coleção deve conter {{ limit }} elementos ou menos.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Esta coleção deve conter exatamente {{ limit }} elemento.|Esta coleção deve conter exatamente {{ limit }} elementos.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Número de cartão inválido.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Tipo de cartão não suportado ou número de cartão inválido.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Este não é um Número Internacional de Conta Bancária (IBAN) válido.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Este valor não é um ISBN-10 válido.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Este valor não é um ISBN-13 válido.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Este valor não é um ISBN-10 e nem um ISBN-13 válido.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Este valor não é um ISSN válido.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Este não é um valor monetário válido.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Este valor deve ser igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Este valor deve ser maior que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Este valor deve ser maior ou igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Este valor deve ser idêntico a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Este valor deve ser menor que {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Este valor deve ser menor ou igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Este valor não deve ser igual a {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>A proporção da imagem é muito grande ({{ ratio }}). A proporção máxima permitida é {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>A proporção da imagem é muito pequena ({{ ratio }}). A proporção mínima esperada é {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>A imagem está num formato quadrado ({{ width }}x{{ height }}px). Imagens com formato quadrado não são permitidas.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>A imagem está orientada à paisagem ({{ width }}x{{ height }}px). Imagens orientadas à paisagem não são permitidas.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>A imagem está orientada ao retrato ({{ width }}x{{ height }}px). Imagens orientadas ao retrato não são permitidas.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Arquivo vazio não é permitido.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>O host não pôde ser resolvido.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Este valor não corresponde ao charset {{ charset }} esperado.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Este não é um Código Identificador Bancário (BIC) válido.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ro.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ro.xlf new file mode 100644 index 0000000..63af470 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ro.xlf @@ -0,0 +1,287 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Această valoare ar trebui să fie falsă (false).</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Această valoare ar trebui să fie adevărată (true).</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Această valoare ar trebui să fie de tipul {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Această valoare ar trebui sa fie goală.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Valoarea selectată nu este o opțiune validă.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Trebuie să selectați cel puțin {{ limit }} opțiune.|Trebuie să selectați cel puțin {{ limit }} opțiuni.|Trebuie să selectați cel puțin {{ limit }} de opțiuni</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Trebuie să selectați cel mult {{ limit }} opțiune.|Trebuie să selectați cel mult {{ limit }} opțiuni.|Trebuie să selectați cel mult {{ limit }} de opțiuni.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Una sau mai multe dintre valorile furnizate sunt invalide.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Acest câmp nu era de aşteptat.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Acest câmp este lipsă.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Această valoare nu reprezintă o dată validă.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Această valoare nu reprezintă o dată și oră validă.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Această valoare nu reprezintă o adresă de e-mail validă.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Fișierul nu a putut fi găsit.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Fișierul nu poate fi citit.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fișierul este prea mare ({{ size }} {{ suffix }}). Dimensiunea maximă permisă este {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Tipul fișierului este invalid ({{ type }}). Tipurile permise de fișiere sunt ({{ types }}).</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Această valoare ar trebui să fie cel mult {{ limit }}.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Această valoare este prea lungă. Ar trebui să aibă maxim {{ limit }} caracter.|Această valoare este prea lungă. Ar trebui să aibă maxim {{ limit }} caractere.|Această valoare este prea lungă. Ar trebui să aibă maxim {{ limit }} de caractere.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Această valoare ar trebui să fie cel puțin {{ limit }}.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Această valoare este prea scurtă. Ar trebui să aibă minim {{ limit }} caracter.|Această valoare este prea scurtă. Ar trebui să aibă minim {{ limit }} caractere.|Această valoare este prea scurtă. Ar trebui să aibă minim {{ limit }} de caractere.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Această valoare nu ar trebui să fie goală.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Această valoare nu ar trebui să fie nulă (null).</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Această valoare ar trebui să fie nulă (null).</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Această valoare nu este validă.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Această valoare nu reprezintă o oră validă.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Această valoare nu reprezintă un URL (link) valid.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Cele două valori ar trebui să fie egale.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Fișierul este prea mare. Mărimea maximă permisă este {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Fișierul este prea mare.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Fișierul nu a putut fi încărcat.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Această valoare nu reprezintă un număr valid.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Acest fișier nu este o imagine validă.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Această valoare nu este o adresă IP validă.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Această valoare nu reprezintă o limbă corectă.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Această valoare nu reprezintă un dialect (o limbă) corect.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Această valoare nu este o țară validă.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Această valoare este folosită deja.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Mărimea imaginii nu a putut fi detectată.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Lățimea imaginii este prea mare ({{ width }}px). Lățimea maximă permisă este de {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Lățimea imaginii este prea mică ({{ width }}px). Lățimea minimă permisă este de {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Înălțimea imaginii este prea mare ({{ height }}px). Înălțimea maximă permisă este de {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Înălțimea imaginii este prea mică ({{ height }}px). Înălțimea minimă permisă este de {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Această valoare trebuie să fie parola curentă a utilizatorului.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Această valoare trebuie să conțină exact {{ limit }} caracter.|Această valoare trebuie să conțină exact {{ limit }} caractere.|Această valoare trebuie să conțină exact {{ limit }} de caractere.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Fișierul a fost încărcat parțial.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Nu a fost încărcat nici un fișier.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Nu este configurat nici un director temporar in php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Nu a fost posibilă scrierea fișierului temporar pe disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>O extensie PHP a prevenit încărcarea cu succes a fișierului.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Această colecție trebuie să conțină cel puțin {{ limit }} element.|Această colecție trebuie să conțină cel puțin {{ limit }} elemente.|Această colecție trebuie să conțină cel puțin {{ limit }} de elemente.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Această colecție trebuie să conțină cel mult {{ limit }} element.|Această colecție trebuie să conțină cel mult {{ limit }} elemente.|Această colecție trebuie să conțină cel mult {{ limit }} de elemente.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Această colecție trebuie să conțină {{ limit }} element.|Această colecție trebuie să conțină {{ limit }} elemente.|Această colecție trebuie să conțină {{ limit }} de elemente.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Numărul card invalid.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Tipul sau numărul cardului nu sunt valide.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Acesta nu este un cod IBAN (International Bank Account Number) valid.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Această valoare nu este un cod ISBN-10 valid.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Această valoare nu este un cod ISBN-13 valid.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Această valoare nu este un cod ISBN-10 sau ISBN-13 valid.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Această valoare nu este un cod ISSN valid.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Această valoare nu este o monedă validă.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Această valoare trebuie să fie egală cu {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Această valoare trebuie să fie mai mare de {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Această valoare trebuie să fie mai mare sau egală cu {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Această valoare trebuie identică cu {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Această valoare trebuie să fie mai mică de {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Această valoare trebuie să fie mai mică sau egală cu {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Această valoare nu trebuie să fie egală cu {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Această valoare nu trebuie să fie identică cu {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Eroare</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ru.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ru.xlf new file mode 100644 index 0000000..11bfead --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ru.xlf @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Значение должно быть ложным.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Значение должно быть истинным.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Тип значения должен быть {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Значение должно быть пустым.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Выбранное Вами значение недопустимо.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Вы должны выбрать хотя бы {{ limit }} вариант.|Вы должны выбрать хотя бы {{ limit }} варианта.|Вы должны выбрать хотя бы {{ limit }} вариантов.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Вы должны выбрать не более чем {{ limit }} вариант.|Вы должны выбрать не более чем {{ limit }} варианта.|Вы должны выбрать не более чем {{ limit }} вариантов.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Одно или несколько заданных значений недопустимо.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Это поле не ожидалось.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Это поле отсутствует.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Значение не является правильной датой.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Значение даты и времени недопустимо.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Значение адреса электронной почты недопустимо.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Файл не может быть найден.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Файл не может быть прочитан.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Файл слишком большой ({{ size }} {{ suffix }}). Максимально допустимый размер {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>MIME-тип файла недопустим ({{ type }}). Допустимы MIME-типы файлов {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Значение должно быть {{ limit }} или меньше.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Значение слишком длинное. Должно быть равно {{ limit }} символу или меньше.|Значение слишком длинное. Должно быть равно {{ limit }} символам или меньше.|Значение слишком длинное. Должно быть равно {{ limit }} символам или меньше.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Значение должно быть {{ limit }} или больше.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Значение слишком короткое. Должно быть равно {{ limit }} символу или больше.|Значение слишком короткое. Должно быть равно {{ limit }} символам или больше.|Значение слишком короткое. Должно быть равно {{ limit }} символам или больше.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Значение не должно быть пустым.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Значение не должно быть null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Значение должно быть null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Значение недопустимо.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Значение времени недопустимо.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Значение не является допустимым URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Оба значения должны быть одинаковыми.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Файл слишком большой. Максимально допустимый размер {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Файл слишком большой.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Файл не может быть загружен.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Значение должно быть числом.</target> + </trans-unit> + <trans-unit id="36"> + <source>This value is not a valid country.</source> + <target>Значение не является допустимой страной.</target> + </trans-unit> + <trans-unit id="37"> + <source>This file is not a valid image.</source> + <target>Файл не является допустимым форматом изображения.</target> + </trans-unit> + <trans-unit id="38"> + <source>This is not a valid IP address.</source> + <target>Значение не является допустимым IP адресом.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid language.</source> + <target>Значение не является допустимым языком.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid locale.</source> + <target>Значение не является допустимой локалью.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Это значение уже используется.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Не удалось определить размер изображения.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Ширина изображения слишком велика ({{ width }}px). Максимально допустимая ширина {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Ширина изображения слишком мала ({{ width }}px). Минимально допустимая ширина {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Высота изображения слишком велика ({{ height }}px). Максимально допустимая высота {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Высота изображения слишком мала ({{ height }}px). Минимально допустимая высота {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Значение должно быть текущим паролем пользователя.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Значение должно быть равно {{ limit }} символу.|Значение должно быть равно {{ limit }} символам.|Значение должно быть равно {{ limit }} символам.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Файл был загружен только частично.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Файл не был загружен.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Не настроена временная директория в php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Невозможно записать временный файл на диск.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Расширение PHP вызвало ошибку при загрузке.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Эта коллекция должна содержать {{ limit }} элемент или больше.|Эта коллекция должна содержать {{ limit }} элемента или больше.|Эта коллекция должна содержать {{ limit }} элементов или больше.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Эта коллекция должна содержать {{ limit }} элемент или меньше.|Эта коллекция должна содержать {{ limit }} элемента или меньше.|Эта коллекция должна содержать {{ limit }} элементов или меньше.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Эта коллекция должна содержать ровно {{ limit }} элемент.|Эта коллекция должна содержать ровно {{ limit }} элемента.|Эта коллекция должна содержать ровно {{ limit }} элементов.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Неверный номер карты.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Неподдерживаемый тип или неверный номер карты.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Значение не является допустимым международным номером банковского счета (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Значение имеет неверный формат ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Значение имеет неверный формат ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Значение не соответствует форматам ISBN-10 и ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Значение не соответствует формату ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Некорректный формат валюты.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Значение должно быть равно {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Значение должно быть больше чем {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Значение должно быть больше или равно {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Значение должно быть идентичным {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Значение должно быть меньше чем {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Значение должно быть меньше или равно {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Значение не должно быть равно {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Значение не должно быть идентичным {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Соотношение сторон изображения слишком велико ({{ ratio }}). Максимальное соотношение сторон {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Соотношение сторон изображения слишком мало ({{ ratio }}). Минимальное соотношение сторон {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Изображение квадратное ({{ width }}x{{ height }}px). Квадратные изображения не разрешены.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Изображение в альбомной ориентации ({{ width }}x{{ height }}px). Изображения в альбомной ориентации не разрешены.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Изображение в портретной ориентации ({{ width }}x{{ height }}px). Изображения в портретной ориентации не разрешены.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Пустые файлы не разрешены.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Имя хоста не может быть разрешено.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Значение не совпадает с ожидаемой {{ charset }} кодировкой.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Ошибка</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sk.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sk.xlf new file mode 100644 index 0000000..8ddb66d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sk.xlf @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Táto hodnota by mala byť nastavená na false.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Táto hodnota by mala byť nastavená na true.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Táto hodnota by mala byť typu {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Táto hodnota by mala byť prázdna.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Táto hodnota by mala byť jednou z poskytnutých možností.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Mali by ste vybrať minimálne {{ limit }} možnosť.|Mali by ste vybrať minimálne {{ limit }} možnosti.|Mali by ste vybrať minimálne {{ limit }} možností.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Mali by ste vybrať najviac {{ limit }} možnosť.|Mali by ste vybrať najviac {{ limit }} možnosti.|Mali by ste vybrať najviac {{ limit }} možností.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Niektoré z uvedených hodnôt sú neplatné.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Toto pole sa neočakáva.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Toto pole chýba.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Tato hodnota nemá platný formát dátumu.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Táto hodnota nemá platný formát dátumu a času.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Táto hodnota nie je platná emailová adresa.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Súbor sa nenašiel.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Súbor nie je čitateľný.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Súbor je príliš veľký ({{ size }} {{ suffix }}). Maximálna povolená veľkosť je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Súbor typu ({{ type }}) nie je podporovaný. Podporované typy sú {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Táto hodnota by mala byť {{ limit }} alebo menej.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znak.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znaky.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znakov.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Táto hodnota by mala byť viac ako {{ limit }}.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Táto hodnota je príliš krátka. Musí obsahovať minimálne {{ limit }} znak.|Táto hodnota je príliš krátka. Musí obsahovať minimálne {{ limit }} znaky.|Táto hodnota je príliš krátka. Minimálny počet znakov je {{ limit }}.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Táto hodnota by mala byť vyplnená.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Táto hodnota by nemala byť null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Táto hodnota by mala byť null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Táto hodnota nie je platná.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Tato hodnota nemá správny formát času.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Táto hodnota nie je platnou URL adresou.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Tieto dve hodnoty by mali byť rovnaké.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Súbor je príliš veľký. Maximálna povolená veľkosť je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Súbor je príliš veľký.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Súbor sa nepodarilo nahrať.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Táto hodnota by mala byť číslo.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Tento súbor nie je obrázok.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Toto nie je platná IP adresa.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Tento jazyk neexistuje.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Táto lokalizácia neexistuje.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Táto krajina neexistuje.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Táto hodnota sa už používa.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Nepodarilo sa zistiť rozmery obrázku.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Obrázok je príliš široký ({{ width }}px). Maximálna povolená šírka obrázku je {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Obrázok je príliš úzky ({{ width }}px). Minimálna šírka obrázku by mala byť {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>>Obrázok je príliš vysoký ({{ height }}px). Maximálna povolená výška obrázku je {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Obrázok je príliš nízky ({{ height }}px). Minimálna výška obrázku by mala byť {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Táto hodnota by mala byť aktuálne heslo používateľa.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Táto hodnota by mala mať presne {{ limit }} znak.|Táto hodnota by mala mať presne {{ limit }} znaky.|Táto hodnota by mala mať presne {{ limit }} znakov.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Bola nahraná len časť súboru.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Žiadny súbor nebol nahraný.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>V php.ini nie je nastavená cesta k adresáru pre dočasné súbory.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Dočasný súbor sa nepodarilo zapísať na disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Rozšírenie PHP zabránilo nahraniu súboru.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Táto kolekcia by mala obsahovať aspoň {{ limit }} prvok alebo viac.|Táto kolekcia by mala obsahovať aspoň {{ limit }} prvky alebo viac.|Táto kolekcia by mala obsahovať aspoň {{ limit }} prvkov alebo viac.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Táto kolekcia by mala maximálne {{ limit }} prvok.|Táto kolekcia by mala obsahovať maximálne {{ limit }} prvky.|Táto kolekcia by mala obsahovať maximálne {{ limit }} prvkov.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Táto kolekcia by mala obsahovať presne {{ limit }} prvok.|Táto kolekcia by mala obsahovať presne {{ limit }} prvky.|Táto kolekcia by mala obsahovať presne {{ limit }} prvkov.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Neplatné číslo karty.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Nepodporovaný typ karty alebo neplatné číslo karty.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Toto je neplatný IBAN.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Táto hodnota je neplatné ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Táto hodnota je neplatné ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Táto hodnota nie je platné ISBN-10 ani ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Táto hodnota nie je platné ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Táto hodnota nie je platná mena.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Táto hodnota by mala byť rovná {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Táto hodnota by mala byť väčšia ako {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Táto hodnota by mala byť väčšia alebo rovná {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Táto hodnota by mala byť typu {{ compared_value_type }} a zároveň by mala byť rovná {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Táto hodnota by mala byť menšia ako {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Táto hodnota by mala byť menšia alebo rovná {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Táto hodnota by nemala byť rovná {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Táto hodnota by nemala byť typu {{ compared_value_type }} a zároveň by nemala byť rovná {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Pomer strán obrázku je príliš veľký ({{ ratio }}). Maximálny povolený pomer strán obrázku je {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Pomer strán obrázku je príliš malý ({{ ratio }}). Minimálny povolený pomer strán obrázku je {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Strany obrázku sú štvorcové ({{ width }}x{{ height }}px). Štvorcové obrázky nie sú povolené.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Obrázok je orientovaný na šírku ({{ width }}x{{ height }}px). Obrázky orientované na šírku nie sú povolené.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Obrázok je orientovaný na výšku ({{ width }}x{{ height }}px). Obrázky orientované na výšku nie sú povolené.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Súbor nesmie byť prázdny.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Hostiteľa nebolo možné rozpoznať.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Táto hodnota nezodpovedá očakávanej znakovej sade {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Táto hodnota nie je platný identifikačný kód podniku (BIC).</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sl.xlf new file mode 100644 index 0000000..6f5fd98 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sl.xlf @@ -0,0 +1,323 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Vrednost bi morala biti nepravilna (false).</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Vrednost bi morala biti pravilna (true).</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Vrednost mora biti naslednjega tipa {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Vrednost mora biti prazna.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Vrednost, ki ste jo izbrali, ni veljavna možnost.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Izbrati morate vsaj {{ limit }} možnost.|Izbrati morate vsaj {{ limit }} možnosti.|Izbrati morate vsaj {{ limit }} možnosti.|Izbrati morate vsaj {{ limit }} možnosti.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Izberete lahko največ {{ limit }} možnost.|Izberete lahko največ {{ limit }} možnosti.|Izberete lahko največ {{ limit }} možnosti.|Izberete lahko največ {{ limit }} možnosti.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Ena ali več podanih vrednosti ni veljavnih.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>To polje ni bilo pričakovati.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>To polje manjka.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Ta vrednost ni veljaven datum.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Ta vrednost ni veljaven datum in čas.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Ta vrednost ni veljaven e-poštni naslov.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Datoteke ni mogoče najti.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Datoteke ni mogoče prebrati.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Datoteka je prevelika ({{ size }} {{ suffix }}). Največja dovoljena velikost je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Mime tip datoteke je neveljaven ({{ type }}). Dovoljeni mime tipi so {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Ta vrednost bi morala biti {{ limit }} ali manj.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Ta vrednost je predolga. Morala bi imeti {{ limit }} znak ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znaka ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znake ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znakov ali manj.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Ta vrednost bi morala biti {{ limit }} ali več.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Ta vrednost je prekratka. Morala bi imeti {{ limit }} znak ali več.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znaka ali več.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znake ali več.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znakov ali več.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Ta vrednost ne bi smela biti prazna.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Ta vrednost ne bi smela biti nedefinirana (null).</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Ta vrednost bi morala biti nedefinirana (null).</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Ta vrednost ni veljavna.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Ta vrednost ni veljaven čas.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Ta vrednost ni veljaven URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Ti dve vrednosti bi morali biti enaki.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Datoteka je prevelika. Največja dovoljena velikost je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Datoteka je prevelika.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Datoteke ni bilo mogoče naložiti.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Ta vrednost bi morala biti veljavna številka.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Ta datoteka ni veljavna slika.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>To ni veljaven IP naslov.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Ta vrednost ni veljaven jezik.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Ta vrednost ni veljavna lokalnost.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Ta vrednost ni veljavna država.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Ta vrednost je že uporabljena.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Velikosti slike ni bilo mogoče zaznati.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Širina slike je preširoka ({{ width }}px). Največja dovoljena širina je {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Širina slike je premajhna ({{ width }}px). Najmanjša predvidena širina je {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Višina slike je prevelika ({{ height }}px). Največja dovoljena višina je {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Višina slike je premajhna ({{ height }}px). Najmanjša predvidena višina je {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Ta vrednost bi morala biti trenutno uporabnikovo geslo.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Ta vrednost bi morala imeti točno {{ limit }} znak.|Ta vrednost bi morala imeti točno {{ limit }} znaka.|Ta vrednost bi morala imeti točno {{ limit }} znake.|Ta vrednost bi morala imeti točno {{ limit }} znakov.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Datoteka je bila le delno naložena.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Nobena datoteka ni bila naložena.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Začasna mapa ni nastavljena v php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Začasne datoteke ni bilo mogoče zapisati na disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP razširitev je vzrok, da nalaganje ni uspelo.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Ta zbirka bi morala vsebovati {{ limit }} element ali več.|Ta zbirka bi morala vsebovati {{ limit }} elementa ali več.|Ta zbirka bi morala vsebovati {{ limit }} elemente ali več.|Ta zbirka bi morala vsebovati {{ limit }} elementov ali več.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Ta zbirka bi morala vsebovati {{ limit }} element ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elementa ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elemente ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elementov ali manj.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Ta zbirka bi morala vsebovati točno {{ limit }} element.|Ta zbirka bi morala vsebovati točno {{ limit }} elementa.|Ta zbirka bi morala vsebovati točno {{ limit }} elemente.|Ta zbirka bi morala vsebovati točno {{ limit }} elementov.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Neveljavna številka kartice.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Nepodprti tip kartice ali neveljavna številka kartice.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>To ni veljavna mednarodna številka bančnega računa (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Neveljavna vrednost po ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Neveljavna vrednost po ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Neveljavna vrednost po ISBN-10 ali po ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Neveljavna vrednost ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Ta vrednost ni veljavna valuta.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Ta vrednost bi morala biti enaka {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Ta vrednost bi morala biti večja od {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Ta vrednost bi morala biti večja ali enaka {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ta vrednost bi morala biti identična {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Ta vrednost bi morala biti manjša od {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Ta vrednost bi morala biti manjša ali enaka {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Ta vrednost ne bi smela biti enaka {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ta vrednost ne bi smela biti identična {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Razmerje slike je preveliko ({{ ratio }}). Največje dovoljeno razmerje je {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Razmerje slike je premajhno ({{ ratio }}). Najmanjše pričakovano razmerje je {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Slika je kvadrat ({{ width }}x{{ height }}px). Kvadratne slike niso dovoljene.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Slika je ležeče usmerjena ({{ width }}x{{ height }}px). Ležeče usmerjene slike niso dovoljene.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Slika je pokončno usmerjena ({{ width }}x{{ height }}px). Pokončno usmerjene slike niso dovoljene.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Prazna datoteka ni dovoljena.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Gostitelja ni bilo mogoče prepoznati.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Ta vrednost se ne ujema s pričakovanim naborom znakov {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>To ni veljavna identifikacijska koda podjetja (BIC).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Napaka</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sq.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sq.xlf new file mode 100644 index 0000000..ffc8ccf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sq.xlf @@ -0,0 +1,227 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Kjo vlerë duhet të jetë e pavërtetë (false).</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Kjo vlerë duhet të jetë e vërtetë (true).</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Kjo vlerë duhet të jetë e llojit {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Kjo vlerë duhet të jetë e zbrazët.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Vlera që keni zgjedhur nuk është alternativë e vlefshme.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Duhet të zgjedhni së paku {{ limit }} alternativa.|Duhet të zgjedhni së paku {{ limit }} alternativa.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Duhet të zgjedhni më së shumti {{ limit }} alternativa.|Duhet të zgjedhni më së shumti {{ limit }} alternativa.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Një apo më shumë nga vlerat e dhëna nuk janë të sakta.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Kjo fushë nuk pritej.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Kjo fushë është zhdukur.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Kjo vlerë nuk është datë e vlefshme.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Kjo vlerë nuk është datë-kohë e vlefshme.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Kjo vlerë nuk është e-mail adresë e vlefshme.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>File nuk mund të gjindej.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>File nuk është i lexueshëm.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>File është shumë i madh ({{ size }} {{ suffix }}). Madhësia më e madhe e lejuar është {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Lloji mime i files nuk është i vlefshëm ({{ type }}). Llojet mime të lejuara janë {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Kjo vlerë duhet të jetë {{ limit }} ose më pak.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Kjo vlerë është shumë e gjatë. Duhet t'i ketë {{ limit }} ose më pak karaktere.|Kjo vlerë është shumë e gjatë. Duhet t'i ketë {{ limit }} ose më pak karaktere.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Kjo vlerë duhet të jetë {{ limit }} ose më shumë.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Kjo vlerë është shumë e shkurtër. Duhet t'i ketë {{ limit }} ose më shumë karaktere.|Kjo vlerë është shumë e shkurtër. Duhet t'i ketë {{ limit }} ose më shumë karaktere.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Kjo vlerë nuk duhet të jetë e zbrazët.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Kjo vlerë nuk duhet të jetë null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Kjo vlerë duhet të jetë null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Kjo vlerë nuk është e vlefshme.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Kjo vlerë nuk është kohë e vlefshme.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Kjo vlerë nuk është URL e vlefshme.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Këto dy vlera duhet të jenë të barabarta.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Ky file është shumë i madh. Madhësia maksimale e lejuar është {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Ky file është shumë i madh.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Ky file nuk mund të ngarkohet.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Kjo vlerë duhet të jetë numër i vlefshëm.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Ky file nuk është imazh i vlefshëm.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Kjo vlerë nuk është IP adresë e vlefshme.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Kjo vlerë nuk është gjuhë e vlefshme.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Kjo vlerë nuk është përcaktim rajonal i vlefshëm.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Kjo vlerë nuk është shtet i vlefshëm.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Kjo vlerë është tashmë në përdorim.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Madhësia e këtij imazhi nuk mund të zbulohet.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Gjerësia e imazhit është shumë e madhe ({{ width }}px). Gjerësia maksimale e lejuar është {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Gjerësia e imazhit është shumë e vogël ({{ width }}px). Gjerësia minimale e pritur është {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Gjatësia e imazhit është shumë e madhe ({{ height }}px). Gjatësia maksimale e lejuar është {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Gjatësia e imazhit është shumë e vogël ({{ height }}px). Gjatësia minimale e pritur është {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Kjo vlerë duhet të jetë fjalëkalimi aktual i përdoruesit.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere.|Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Ky file është ngarkuar pjesërisht.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Nuk është ngarkuar ndonjë file.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Asnjë folder i përkohshëm nuk është konfiguruar në php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Nuk mund të shkruhet file i përkohshëm në disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Një ekstenzion i PHP-së bëri të dështojë ngarkimi i files.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.|Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.|Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Ky kolekcion duhet të përmbajë saktësisht {{ limit }} elemente.|Ky kolekcion duhet të përmbajë saktësisht {{ limit }} elemente.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Numër kartele i pavlefshëm.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Lloj kartele i pambështetur ose numër kartele i pavlefshëm.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf new file mode 100644 index 0000000..81f5210 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf @@ -0,0 +1,303 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Вредност треба да буде нетачна.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Вредност треба да буде тачна.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Вредност треба да буде типа {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Вредност треба да буде празна.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Вредност треба да буде једна од понуђених.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Изаберите бар {{ limit }} могућност.|Изаберите бар {{ limit }} могућности.|Изаберите бар {{ limit }} могућности.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Изаберите највише {{ limit }} могућност.|Изаберите највише {{ limit }} могућности.|Изаберите највише {{ limit }} могућности.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Једна или више вредности је невалидна.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Ово поље не очекује.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Ово поље недостаје.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Вредност није валидан датум.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Вредност није валидан датум-време.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Вредност није валидна адреса електронске поште.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Датотека не може бити пронађена.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Датотека није читљива.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Датотека је превелика ({{ size }} {{ suffix }}). Највећа дозвољена величина је {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Миме тип датотеке није валидан ({{ type }}). Дозвољени миме типови су {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Вредност треба да буде {{ limit }} или мање.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Вредност је предугачка. Треба да има {{ limit }} карактер или мање.|Вредност је предугачка. Треба да има {{ limit }} карактера или мање.|Вредност је предугачка. Треба да има {{ limit }} карактера или мање.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Вредност треба да буде {{ limit }} или више.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Вредност је прекратка. Треба да има {{ limit }} карактер или више.|Вредност је прекратка. Треба да има {{ limit }} карактера или више.|Вредност је прекратка. Треба да има {{ limit }} карактера или више.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Вредност не треба да буде празна.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Вредност не треба да буде null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Вредност треба да буде null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Вредност је невалидна.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Вредност није валидно време.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Вредност није валидан URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Обе вредности треба да буду једнаке.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Датотека је превелика. Највећа дозвољена величина је {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Датотека је превелика.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Датотека не може бити отпремљена.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Вредност треба да буде валидан број.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Ова датотека није валидна слика.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Ово није валидна ИП адреса.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Вредност није валидан језик.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Вредност није валидан локал.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Вредност није валидна земља.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Вредност је већ искоришћена.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Величина слике не може бити одређена.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Ширина слике је превелика ({{ width }}px). Најећа дозвољена ширина је {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Ширина слике је премала ({{ width }}px). Најмања дозвољена ширина је {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Висина слике је превелика ({{ height }}px). Најећа дозвољена висина је {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Висина слике је премала ({{ height }}px). Најмања дозвољена висина је {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Вредност треба да буде тренутна корисничка лозинка.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Вредност треба да има тачно {{ limit }} карактер.|Вредност треба да има тачно {{ limit }} карактера.|Вредност треба да има тачно {{ limit }} карактера.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Датотека је само парцијално отпремљена.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Датотека није отпремљена.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Привремени директоријум није конфигурисан у php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Немогуће писање привремене датотеке на диск.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP екстензија је проузроковала неуспех отпремања датотеке.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Ова колекција треба да садржи {{ limit }} или више елемената.|Ова колекција треба да садржи {{ limit }} или више елемената.|Ова колекција треба да садржи {{ limit }} или више елемената.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Ова колекција треба да садржи {{ limit }} или мање елемената.|Ова колекција треба да садржи {{ limit }} или мање елемената.|Ова колекција треба да садржи {{ limit }} или мање елемената.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Ова колекција треба да садржи тачно {{ limit }} елемент.|Ова колекција треба да садржи тачно {{ limit }} елемента.|Ова колекција треба да садржи тачно {{ limit }} елемената.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Невалидан број картице.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Невалидан број картице или тип картице није подржан.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Ово није валидан међународни број банковног рачуна (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Ово није валидан ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Ово није валидан ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Ово није валидан ISBN-10 или ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Ово није валидан ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Ово није валидна валута.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Ова вредност треба да буде {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Ова вредност треба да буде већа од {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Ова вредност треба да буде већа или једнака {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ова вредност треба да буде идентична са {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Ова вредност треба да буде мања од {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Ова вредност треба да буде мања или једнака {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Ова вредност не треба да буде једнака {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ова вредност не треба да буде идентична са {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Размера ове слике је превелика ({{ ratio }}). Максимална дозвољена размера је {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Размера ове слике је премала ({{ ratio }}). Минимална очекивана размера је {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Слика је квадратна ({{ width }}x{{ height }}px). Квадратне слике нису дозвољене.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Слика је оријентације пејзажа ({{ width }}x{{ height }}px). Пејзажна оријентација слика није дозвољена.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Слика је оријантације портрета ({{ width }}x{{ height }}px). Портретна оријентација слика није дозвољена.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf new file mode 100644 index 0000000..60c093a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf @@ -0,0 +1,303 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Vrednost treba da bude netačna.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Vrednost treba da bude tačna.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Vrednost treba da bude tipa {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Vrednost treba da bude prazna.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Vrednost treba da bude jedna od ponuđenih.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Izaberite bar {{ limit }} mogućnost.|Izaberite bar {{ limit }} mogućnosti.|Izaberite bar {{ limit }} mogućnosti.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Izaberite najviše {{ limit }} mogućnost.|Izaberite najviše {{ limit }} mogućnosti.|Izaberite najviše {{ limit }} mogućnosti.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Jedna ili više vrednosti je nevalidna.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Ovo polje ne očekuje.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Ovo polje nedostaje.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Vrednost nije validan datum.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Vrednost nije validan datum-vreme.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Vrednost nije validna adresa elektronske pošte.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Datoteka ne može biti pronađena.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Datoteka nije čitljiva.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veličina je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Mime tip datoteke nije validan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Vrednost treba da bude {{ limit }} ili manje.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Vrednost je predugačka. Treba da ima {{ limit }} karakter ili manje.|Vrednost je predugačka. Treba da ima {{ limit }} karaktera ili manje.|Vrednost je predugačka. Treba da ima {{ limit }} karaktera ili manje.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Vrednost treba da bude {{ limit }} ili više.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Vrednost je prekratka. Treba da ima {{ limit }} karakter ili više.|Vrednost je prekratka. Treba da ima {{ limit }} karaktera ili više.|Vrednost je prekratka. Treba da ima {{ limit }} karaktera ili više.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Vrednost ne treba da bude prazna.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Vrednost ne treba da bude null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Vrednost treba da bude null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Vrednost je nevalidna.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Vrednost nije validno vreme.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Vrednost nije validan URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Obe vrednosti treba da budu jednake.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Datoteka je prevelika. Najveća dozvoljena veličina je {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Datoteka je prevelika.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Datoteka ne može biti otpremljena.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Vrednost treba da bude validan broj.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Ova datoteka nije validna slika.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Ovo nije validna IP adresa.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Vrednost nije validan jezik.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Vrednost nije validan lokal.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Vrednost nije validna zemlja.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Vrednost je već iskorišćena.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Veličina slike ne može biti određena.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Širina slike je prevelika ({{ width }}px). Najeća dozvoljena širina je {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Širina slike je premala ({{ width }}px). Najmanja dozvoljena širina je {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Visina slike je prevelika ({{ height }}px). Najeća dozvoljena visina je {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Visina slike je premala ({{ height }}px). Najmanja dozvoljena visina je {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Vrednost treba da bude trenutna korisnička lozinka.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Vrednost treba da ima tačno {{ limit }} karakter.|Vrednost treba da ima tačno {{ limit }} karaktera.|Vrednost treba da ima tačno {{ limit }} karaktera.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Datoteka je samo parcijalno otpremljena.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Datoteka nije otpremljena.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Privremeni direktorijum nije konfigurisan u php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Nemoguće pisanje privremene datoteke na disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP ekstenzija je prouzrokovala neuspeh otpremanja datoteke.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Ova kolekcija treba da sadrži {{ limit }} ili više elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili više elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili više elemenata.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Ova kolekcija treba da sadrži tačno {{ limit }} element.|Ova kolekcija treba da sadrži tačno {{ limit }} elementa.|Ova kolekcija treba da sadrži tačno {{ limit }} elemenata.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Nevalidan broj kartice.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Nevalidan broj kartice ili tip kartice nije podržan.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Ovo nije validan međunarodni broj bankovnog računa (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Ovo nije validan ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Ovo nije validan ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Ovo nije validan ISBN-10 ili ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Ovo nije validan ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Ovo nije validna valuta.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Ova vrednost treba da bude {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Ova vrednost treba da bude veća od {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Ova vrednost treba da bude veća ili jednaka {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ova vrednost treba da bude identična sa {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Ova vrednost treba da bude manja od {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Ova vrednost treba da bude manja ili jednaka {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Ova vrednost ne treba da bude jednaka {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ova vrednost ne treba da bude identična sa {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Razmera ove slike je prevelika ({{ ratio }}). Maksimalna dozvoljena razmera je {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Razmera ove slike je premala ({{ ratio }}). Minimalna očekivana razmera je {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Slika je kvadratna ({{ width }}x{{ height }}px). Kvadratne slike nisu dozvoljene.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Slika je orijentacije pejzaža ({{ width }}x{{ height }}px). Pejzažna orijentacija slika nije dozvoljena.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Slika je orijantacije portreta ({{ width }}x{{ height }}px). Portretna orijentacija slika nije dozvoljena.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sv.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sv.xlf new file mode 100644 index 0000000..40dd63e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sv.xlf @@ -0,0 +1,323 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Värdet ska vara falskt.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Värdet ska vara sant.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Värdet ska vara av typen {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Värdet ska vara tomt.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Värdet ska vara ett av de givna valen.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Du måste välja minst {{ limit }} val.|Du måste välja minst {{ limit }} val.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Du kan som mest välja {{ limit }} val.|Du kan som mest välja {{ limit }} val.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Ett eller fler av de angivna värdena är ogiltigt.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Det här fältet förväntades inte.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Det här fältet saknas.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Värdet är inte ett giltigt datum.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Värdet är inte ett giltigt datum med tid.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Värdet är inte en giltig e-postadress.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Filen kunde inte hittas.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Filen är inte läsbar.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Filen är för stor ({{ size }} {{ suffix }}). Största tillåtna storlek är {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Filens MIME-typ ({{ type }}) är ogiltig. De tillåtna typerna är {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Värdet ska vara {{ limit }} eller mindre.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Värdet är för långt. Det ska ha {{ limit }} tecken eller färre.|Värdet är för långt. Det ska ha {{ limit }} tecken eller färre.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Värdet ska vara {{ limit }} eller mer.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Värdet är för kort. Det ska ha {{ limit }} tecken eller mer.|Värdet är för kort. Det ska ha {{ limit }} tecken eller mer.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Värdet kan inte vara tomt.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Värdet kan inte vara null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Värdet ska vara null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Värdet är inte giltigt.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Värdet är inte en giltig tid.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Värdet är inte en giltig URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>De två värdena måste vara lika.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Filen är för stor. Tillåten maximal storlek är {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Filen är för stor.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Filen kunde inte laddas upp.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Värdet ska vara ett giltigt nummer.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Filen är ingen giltig bild.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Det här är inte en giltig IP-adress.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Värdet är inte ett giltigt språk.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Värdet är inte en giltig plats.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Värdet är inte ett giltigt land.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Värdet används redan.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Det gick inte att fastställa storleken på bilden.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Bildens bredd är för stor ({{ width }}px). Tillåten maximal bredd är {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Bildens bredd är för liten ({{ width }}px). Minsta förväntade bredd är {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Bildens höjd är för stor ({{ height }}px). Tillåten maximal bredd är {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Bildens höjd är för liten ({{ height }}px). Minsta förväntade höjd är {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Värdet ska vara användarens nuvarande lösenord.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Värdet ska ha exakt {{ limit }} tecken.|Värdet ska ha exakt {{ limit }} tecken.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Filen laddades bara upp delvis.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Ingen fil laddades upp.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Det finns ingen temporär mapp konfigurerad i php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Kan inte skriva temporär fil till disken.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>En PHP extension gjorde att uppladdningen misslyckades.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Den här samlingen ska innehålla {{ limit }} element eller mer.|Den här samlingen ska innehålla {{ limit }} element eller mer.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Den här samlingen ska innehålla {{ limit }} element eller mindre.|Den här samlingen ska innehålla {{ limit }} element eller mindre.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Den här samlingen ska innehålla exakt {{ limit }} element.|Den här samlingen ska innehålla exakt {{ limit }} element.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Ogiltigt kortnummer.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Okänd korttyp eller ogiltigt kortnummer.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Det här är inte en giltig International Bank Account Number (IBANK).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Värdet är inte en giltig ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Värdet är inte en giltig ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Värdet är varken en giltig ISBN-10 eller en giltig ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Värdet är inte en giltig ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Värdet är inte en giltig valuta.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Värdet ska vara detsamma som {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Värdet ska vara större än {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Värdet ska bara större än eller detsamma som {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Värdet ska vara identiskt till {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Värdet ska vara mindre än {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Värdet ska vara mindre än eller detsamma som {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Värdet ska inte vara detsamma som {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Värdet ska inte vara identiskt med {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Förhållandet mellan bildens bredd och höjd är för stort ({{ ratio }}). Högsta tillåtna förhållande är {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Förhållandet mellan bildens bredd och höjd är för litet ({{ ratio }}). Minsta tillåtna förhållande är {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Bilden är kvadratisk ({{ width }}x{{ height }}px). Kvadratiska bilder tillåts inte.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Bilden är landskapsorienterad ({{ width }}x{{ height }}px). Landskapsorienterade bilder tillåts inte.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Bilden är porträttsorienterad ({{ width }}x{{ height }}px). Porträttsorienterade bilder tillåts inte.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>En tom fil är inte tillåten.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Värddatorn kunde inte hittas.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Detta värde har inte den förväntade teckenkodningen {{ charset }}.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Detta är inte en giltig BIC-kod.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Fel</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.th.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.th.xlf new file mode 100644 index 0000000..d5b5703 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.th.xlf @@ -0,0 +1,303 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>ค่านี้ควรจะเป็น false</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>ค่านี้ควรจะเป็น true</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>ค่านี้ควรจะเป็นชนิด {{ type }}</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>ควรจะเป็นค่าว่าง</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>คุณเลือกค่าที่ไม่ตรงกับตัวเลือก</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>คุณต้องเลือกอย่างน้อย {{ limit }} ตัวเลือก</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>คุณเลือกได้มากที่สุด {{ limit }} ตัวเลือก</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>มีบางค่าที่ส่งมาไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>ฟิลด์นี้ที่ไม่ได้คาดหวัง</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>ฟิลด์นี้จะหายไป</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>ค่าของวันที่ไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>ค่าของวันที่และเวลาไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>ค่าของอีเมล์ไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>ไม่พบไฟล์</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>ไฟล์ไม่อยู่ในสถานะที่สามารถอ่านได้</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>ไฟล์ใหญ่เกิน ({{ size }} {{ suffix }}) อนุญาตให้ใหญ่ที่สุดได้ไม่เกิน {{ limit }} {{ suffix }}</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Mime type ของไฟล์ไม่ถูกต้อง ({{ type }}) Mime types ที่อนุญาตคือ {{ types }}</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>ค่านี้ควรจะเป็น {{ limit }} หรือน้อยกว่านั้น</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>ค่านี้ยาวเกินไป ควรจะมีแค่ {{ limit }} ตัวอักษรหรือน้อยกว่านั้น</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>ค่านี้ควรจะมี {{ limit }} หรือมากกว่านั้น</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>ค่านี้สั้นเกินไป ควรจะมี {{ limit }} ตัวอักษรหรือมากกว่านั้น</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>ค่านี้ไม่ควรเป็นค่าว่าง</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>ค่านี้ไม่ควรเป็นค่า null</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>ค่านี้ควรเป็นค่า null</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>ค่านี้ไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>ค่าของเวลาไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>ค่าของ URL ไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>ค่าทั้งสองค่าควรจะเหมือนกัน</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>ขนาดไฟล์ใหญ่เกินไป อนุญาตให้ไฟล์ขนาดใหญ่ได้ไม่เกิน {{ limit }} {{ suffix }}</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>ขนาดไฟล์ใหญ่เกินไป</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>ไม่สามารถอัปโหลดไฟล์ได้</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>ค่าของตัวเลขไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>ไฟล์นี้ไม่ใช่ไฟล์รูปภาพ</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>ค่าของ IP ไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>ค่าของภาษาไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>ค่าของภูมิภาค (Locale) ไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>ค่าของประเทศไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Tค่านี้ถูกใช้งานไปแล้ว</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>ไม่สามารถตรวจสอบขนาดไฟล์ของภาพได้</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>ความกว้างของภาพเกินขนาด ({{ width }}px) อนุญาตให้กว้างได้มากที่สุด {{ max_width }}px</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>ความกว้างของภาพไม่ได้ขนาด ({{ width }}px) อนุญาตให้สั้นที่สุด {{ min_width }}px</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>ความสูงของภาพเกินขนาด ({{ height }}px) อนุญาตให้สูงได้มากที่สุด {{ max_height }}px</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>ความสูงของภาพไม่ได้ขนาด ({{ height }}px) อนุญาตให้สูงอย่างน้อยที่สุด {{ min_height }}px</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>ค่านี้ควรจะเป็นรหัสผ่านปัจจุบันของผู้ใช้</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>ค่านี้ควรจะมีความยาว {{ limit }} ตัวอักษร</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>อัปโหลดไฟล์ได้เพียงบางส่วนเท่านั้น</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>ไม่มีไฟล์ใดถูกอัปโหลด</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>ไม่พบไฟล์ temp ควรจะกำหนดใน php.ini</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>ไม่สามารถเขียน temp ไฟล์ลงดิสก์ได้</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>PHP extension เกี่ยวกับการอัปโหลดมีปัญหา</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>คอเล็กชั่นนี้ควรจะประกอบไปด้วยอ่างน้อย {{ limit }} สมาชิก</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>คอเล็กชั่นนี้ไม่ควรมีสมาชิกเกิน {{ limit }}</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>คอเล็กชั่นนี้ควรจะมีสมาชิก {{ limit }} เท่านั้น</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>หมายเลขบัตรไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>ไม่รู้จักประเภทของบัตร หรือหมายเลขบัตรไม่ถูกต้อง</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>นี่ไม่ถูกต้องตาม International Bank Account Number (IBAN)</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>ค่านี้ไม่ถูกต้องตาม ISBN-10</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>ค่านี้ไม่ถูกต้องตาม ISBN-13</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>ค่านี้ไม่ถูกต้องตามทั้ง ISBN-10 และ ISBN-13</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>ค่านี้ไม่ถุกต้องตาม ISSN</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>ค่านี้ไม่ถูกต้องตามสกุลเงิน</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>ค่านี้ไม่ตรงกับ {{ compared_value }}</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>ค่านี้ควรจะมากกว่า {{ compared_value }}</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>ค่านี้ควรจะมากกว่าหรือตรงกับ {{ compared_value }}</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>ค่านี้ควรจะเหมือนกันกับ {{ compared_value_type }} {{ compared_value }}</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>ค่านี้ควรจะน้อยกว่า {{ compared_value }}</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>ค่านี้ควรจะน้อยกว่าหรือเท่ากับ {{ compared_value }}</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>ค่านี้ไม่ควรเท่ากันกับ {{ compared_value }}</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>ค่านี้ไม่ควรเหมือนกันกับ {{ compared_value_type }} {{ compared_value }}</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>สัดส่วนของภาพใหญ่เกิน ({{ ratio }}) สามารถมีขนาดใหญ่ที่สุดได้ {{ max_ratio }}</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>สัดส่วนของภาพเล็กเกิน ({{ ratio }}) สามารถมีขนาดเล็กที่สุดได้ {{ min_ratio }}</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>รูปภาพเป็นจุตรัส ({{ width }}x{{ height }}px) ไม่อนุญาตภาพที่เป็นสี่เหลี่ยมจตุรัส</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>ภาพนี้เป็นแนวนอน ({{ width }}x{{ height }}px) ไม่อนุญาตภาพที่เป็นแนวนอน</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>ภาพนี้เป็นแนวตั้ง ({{ width }}x{{ height }}px) ไม่อนุญาตภาพที่เป็นแนวตั้ง</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tl.xlf new file mode 100644 index 0000000..75dc329 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tl.xlf @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Ang halaga nito ay dapat na huwad.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Ang halaga nito ay dapat totoo.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Ang halaga nito ay dapat sa uri {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Ang halaga nito ay dapat walang laman.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Ang halaga ng iyong pinili ay hindi balidong pagpili.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Kailangan mong pumili ng pinakamababang {{ limit }} ng pagpilian.|Kailangan mong pumili ng pinakamababang {{ limit }} ng mga pagpipilian.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Kailangan mong pumili ng pinakamataas {{ limit }} ng pagpipilian.|Kailangan mong pumili ng pinakamataas {{ limit }} ng mga pagpipilian.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Isa o higit pang mga halaga na binigay ay hindi balido.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Ang larangang ito ay hindi inaasahan.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Ang patlang na ito ay nawawala.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Ang halagang ito ay hindi balidong petsa.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Ang halagang ito ay hindi wastong petsa/oras.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Ang halagang ito ay hindi balidong address ng email.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Ang file na ito ay hindi makita.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Ang file na ito ay hindi mabasa.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Ang file na ito ay masyadong malaki ({{ size }} {{ suffix }}). Ang pinakamalaking sukat {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Ang uri ng file ng mime ay hindi balido ({{ type }}).Ang mga pinapayagang uri ng mime ay ang {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Ang halaga nito ay dapat na {{ limit }} or maliit pa.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Ang halaga nito ay masyadong mahaba.Ito ay dapat na {{ limit }} karakter o maliit pa.|Ang halaga nito ay masyadong mahaba. Ito ay dapat na {{ limit }} mga karakter o maliit pa.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Ang halaga nito ay dapat na {{ limit }} o mas marami pa.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Ang halaga nito ay masyadong maliit. Ito ay dapat na {{ limit }} karakter o marami pa.|Ang halaga nito ay masyadong maliit. Ito ay dapat na {{ limit }} mga karakter o marami pa.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Ang halaga na ito ay dapat na may laman.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Meron dapt itong halaga.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Wala dapat itong halaga.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Hindi balido ang halagang ito.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Ang halagang ito ay hindi wastong oras.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Hindi ito isang balidong URL.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Ang dalwang halaga ay dapat magkapareha.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Ang file ay masyadong malaki. Ang pinapayagan halaga lamang ay {{ limit}} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Ang file na ito ay masyadong malaki.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Ang file na ito ay hindi ma-upload.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Ang halaga nito ay dapat na wastong numero.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Ang file na ito ay hindi wastong imahe.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Ito ay hindi wastong IP address.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Ang halaga na ito ay hindi balidong wika.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Ito ay isang hindi wastong locale na halaga.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>ng halaga na ito ay hindi wastong bansa.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Ang halaga na ito ay ginamit na.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Ang sukat ng imahe ay hindi madetect.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Ang lapad ng imahe ay masyadong malaki ({{ width }}px). Ang pinapayagang lapay ay {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Ang lapad ng imahe ay masyadong maliit ({{ width }}px). Ang pinakamaliit na pinapayagang lapad ay {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Ang haba ng imahe ay masyadong mataas ({{ height }}px). Ang pinakmataas na haba ay {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Ang haba ng imahe ay masyadong maliit ({{ height }}px). Ang inaasahang haba ay {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Ang halagang ito ay dapat na password ng kasalukuyang gumagamit.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Ang halagang ito ay dapat na eksakto sa {{ limit}} karakter.|Ang halagang ito ay dapat na eksakto sa {{ limit }} mga karakter.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Ang file na ito ay kahalating na upload lamang.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Walang na upload na file.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Walang temporaryong folder ang naayos sa php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Temporaryong hindi makasulat ng file sa disk.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Ang dahilan ng pagkabigo ng pagupload ng files ay isang extension ng PHP.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} elemento o marami pa.|Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} mga elemento o marami pa.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} elemento o maliit pa.|Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} mga elemento o maliit pa.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Ang koleksyong ito ay magkaroon ng eksaktong {{ limit }} elemento.|Ang koleksyong ito ay magkaroon ng eksaktong {{ limit }} mga elemento.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Hindi wastong numero ng kard.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Hindi supportadong uri ng kard o hindi wastong numero ng kard.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Ito ay hindi isang balidong International Bank Account Number (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Ang halagang ito ay hindi balidong SBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Ang halagang ito ay hindi balidong ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Ang halagang ito ay pwdeng isang balidong ISBN-10 o isang balidong ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Ang halangang ito ay hindi isang balidong ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Ang halagang ito ay hindi balidong pera.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Ito ay hindi dapat magkapareho sa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Ang halagang ito ay dapat tataas sa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Ang halagang ito ay dapat mas mataas o magkapareha sa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ang halagang ito ay dapat kapareha ng {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Ang halagang ito ay dapat mas maliit sa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Ang halagang ito ay dapat mas mmaliit o magkapareha sa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Ang halagang ito ay hindi dapat magkapareha sa {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Ang halagang ito ay hindi dapat magkapareha sa {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Ang ratio ng imahe ay masyadong malaki ({{ ratio }}). Ang pinakamalaking ratio ay {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>ng ratio ng imahe ay masyadong maliit ({{ ratio }}). Ang pinamaliit na ratio ay {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Ang imahe ay kwadrado ({{ width }}x{{ height }}px). Ang mga kwadradong imahe ay hindi pwede.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Ang orientasyon ng imahe ay nakalandscape ({{ width }}x{{ height }}px). Ang mga imaheng nakalandscape ang orientasyon ay hindi pwede.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Ang orientasyon ng imahe ay nakaportrait ({{ width }}x{{ height }}px). PAng mga imaheng nakaportrait ang orientasyon ay hindi pwede.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Ang file na walang laman ay hindi pwede.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Hindi maresolba ang host.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Ang halaga ay hindi kapareha sa inaasahang {{ charset }} set ng karater.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Ito ay hindi isang balidong Business Identifier Code (BIC).</target> + </trans-unit> + </body> + </file> + </xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tr.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tr.xlf new file mode 100644 index 0000000..5e19e3e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tr.xlf @@ -0,0 +1,231 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Bu değer olumsuz olmalıdır.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Bu değer olumlu olmalıdır.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Bu değerin tipi {{ type }} olmalıdır.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Bu değer boş olmalıdır.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Seçtiğiniz değer geçerli bir seçenek değil.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>En az {{ limit }} seçenek belirtmelisiniz.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>En çok {{ limit }} seçenek belirtmelisiniz.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Verilen değerlerden bir veya daha fazlası geçersiz.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Bu alan beklenen olmadı.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Bu alan, eksik</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Bu değer doğru bir tarih biçimi değildir.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Bu değer doğru bir tarihsaat biçimi değildir.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Bu değer doğru bir e-mail adresi değildir.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Dosya bulunamadı.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Dosya okunabilir değil.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Dosya çok büyük ({{ size }} {{ suffix }}). İzin verilen en büyük dosya boyutu {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Dosyanın mime tipi geçersiz ({{ type }}). İzin verilen mime tipleri {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Bu değer {{ limit }} ve altında olmalıdır.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Bu değer çok uzun. {{ limit }} karakter veya daha az olmalıdır.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Bu değer {{ limit }} veya daha fazla olmalıdır.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Bu değer çok kısa. {{ limit }} karakter veya daha fazla olmaldır.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Bu değer boş bırakılmamalıdır.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Bu değer boş bırakılmamalıdır.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Bu değer boş bırakılmalıdır.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Bu değer geçerli değil.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Bu değer doğru bir saat değil.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Bu değer doğru bir URL değil.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>İki değer eşit olmalıdır.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Dosya çok büyük. İzin verilen en büyük dosya boyutu {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Dosya çok büyük.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Dosya yüklenemiyor.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Bu değer geçerli bir rakam olmalıdır.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Bu dosya geçerli bir resim değildir.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Bu geçerli bir IP adresi değildir.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Bu değer geçerli bir lisan değil.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Bu değer geçerli bir yer değildir.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Bu değer geçerli bir ülke değildir.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Bu değer şu anda kullanımda.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Resmin boyutu saptanamıyor.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Resmin genişliği çok büyük ({{ width }}px). İzin verilen en büyük genişlik {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Resmin genişliği çok küçük ({{ width }}px). En az {{ min_width }}px olmalıdır.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Resmin yüksekliği çok büyük ({{ height }}px). İzin verilen en büyük yükseklik {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Resmin yüksekliği çok küçük ({{ height }}px). En az {{ min_height }}px olmalıdır.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Bu değer kullanıcının şu anki şifresi olmalıdır.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Bu değer tam olarak {{ limit }} karakter olmaldır.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Dosya sadece kısmen yüklendi.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Hiçbir dosya yüklenmedi.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>php.ini içerisinde geçici dizin tanımlanmadı.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Geçici dosya diske yazılamıyor.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Bir PHP eklentisi dosyanın yüklemesini başarısız kıldı.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Bu derlem {{ limit }} veya daha çok eleman içermelidir.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Bu derlem {{ limit }} veya daha az eleman içermelidir.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Bu derlem {{ limit }} eleman içermelidir.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Geçersiz kart numarası.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Desteklenmeyen kart tipi veya geçersiz kart numarası.</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Hata</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.uk.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.uk.xlf new file mode 100644 index 0000000..6a92801 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.uk.xlf @@ -0,0 +1,323 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Значення повинно бути Ні.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Значення повинно бути Так.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Тип значення повинен бути {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Значення повинно бути пустим.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Обране вами значення недопустиме.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Ви повинні обрати хоча б {{ limit }} варіант.|Ви повинні обрати хоча б {{ limit }} варіанти.|Ви повинні обрати хоча б {{ limit }} варіантів.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Ви повинні обрати не більше ніж {{ limit }} варіантів.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Одне або кілька заданих значень є недопустимі.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Це поле не очікується.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Це поле не вистачає.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Дане значення не є вірною датою.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Дане значення дати та часу недопустиме.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Значення адреси электронної пошти недопустиме.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Файл не знайдено.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Файл не читається.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Файл занадто великий ({{ size }} {{ suffix }}). Дозволений максимальний розмір {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>MIME-тип файлу недопустимий ({{ type }}). Допустимі MIME-типи файлів {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Значення повинно бути {{ limit }} або менше.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Значення занадто довге. Повинно бути рівне {{ limit }} символу або менше.|Значення занадто довге. Повинно бути рівне {{ limit }} символам або менше.|Значення занадто довге. Повинно бути рівне {{ limit }} символам або менше.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Значення повинно бути {{ limit }} або більше.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Значення занадто коротке. Повинно бути рівне {{ limit }} символу або більше.|Значення занадто коротке. Повинно бути рівне {{ limit }} символам або більше.|Значення занадто коротке. Повинно бути рівне {{ limit }} символам або більше.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Значення не повинно бути пустим.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Значення не повинно бути null.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Значення повинно бути null.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Значення недопустиме.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Значення часу недопустиме.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Значення URL недопустиме.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Обидва занчення повинні бути одинаковими.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Файл занадто великий. Максимальний допустимий розмір {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Файл занадто великий.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Файл не можливо завантажити.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Значення має бути допустимим числом.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Цей файл не є допустимим форматом зображення.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Це некоректна IP адреса.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Це некоректна мова.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Це некоректна локалізація.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Це некоректна країна.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Це значення вже використовується.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Не вдалося визначити розмір зображення.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Ширина зображення занадто велика ({{ width }}px). Максимально допустима ширина {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Ширина зображення занадто мала ({{ width }}px). Мінімально допустима ширина {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Висота зображення занадто велика ({{ height }}px). Максимально допустима висота {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Висота зображення занадто мала ({{ height }}px). Мінімально допустима висота {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Значення має бути поточним паролем користувача.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Значення повиино бути рівним {{ limit }} символу.|Значення повиино бути рівним {{ limit }} символам.|Значення повиино бути рівним {{ limit }} символам.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Файл був завантажений лише частково.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Файл не був завантажений.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Не налаштована тимчасова директорія в php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Неможливо записати тимчасовий файл на диск.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Розширення PHP викликало помилку при завантаженні.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Ця колекція повинна містити {{ limit }} елемент чи більше.|Ця колекція повинна містити {{ limit }} елемента чи більше.|Ця колекція повинна містити {{ limit }} елементів чи більше.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Ця колекція повинна містити {{ limit }} елемент чи менше.|Ця колекція повинна містити {{ limit }} елемента чи менше.|Ця колекція повинна містити {{ limit }} елементов чи менше.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Ця колекція повинна містити рівно {{ limit }} елемент.|Ця колекція повинна містити рівно {{ limit }} елемента.|Ця колекція повинна містити рівно {{ limit }} елементів.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Невірний номер карти.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Непідтримуваний тип карти або невірний номер карти.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Це не дійсний міжнародний номер банківського рахунку (IBAN).</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Значення не у форматі ISBN-10.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Значення не у форматі ISBN-13.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Значення не відповідає форматам ISBN-10 та ISBN-13.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Значення має невірний формат ISSN.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Значення має невірний формат валюти.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Значення повинно дорівнювати {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Значення має бути більше ніж {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Значення має бути більше або дорівнювати {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Значення має бути ідентичним {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Значення повинно бути менше ніж {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Значення повинно бути менше або дорівнювати {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Значення не повинно дорівнювати {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Значення не повинно бути ідентичним {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>Співвідношення сторін зображення занадто велике ({{ ratio }}). Максимальне співвідношення сторін {{ max_ratio }}.</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>Співвідношення сторін зображення занадто мало ({{ ratio }}). Мінімальне співвідношення сторін {{ min_ratio }}.</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>Зображення квадратне ({{ width }}x{{ height }}px). Квадратні зображення не дозволені.</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>Зображення альбомної орієнтації ({{ width }}x{{ height }}px). Зображення альбомної орієнтації не дозволені.</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>Зображення в портретній орієнтації ({{ width }}x{{ height }}px). Зображення в портретної орієнтації не дозволені.</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>Порожні файли не дозволені.</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>Ім'я хоста не знайдено.</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>Значення не збігається з очікуваним {{ charset }} кодуванням.</target> + </trans-unit> + <trans-unit id="81"> + <source>This is not a valid Business Identifier Code (BIC).</source> + <target>Це не дійсний банківський код (BIC).</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>Помилка</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.vi.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.vi.xlf new file mode 100644 index 0000000..e1833c7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.vi.xlf @@ -0,0 +1,283 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>Giá trị này phải là sai.</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>Giá trị này phải là đúng.</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>Giá trị này phải là kiểu {{ type }}.</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>Giá trị này phải rỗng.</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>Giá trị bạn vừa chọn không hợp lệ.</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>Bạn phải chọn ít nhất {{ limit }} lựa chọn.|Bạn phải chọn ít nhất {{ limit }} lựa chọn.</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>Bạn phải chọn nhiều nhất {{ limit }} lựa chọn.|Bạn phải chọn nhiều nhất {{ limit }} lựa chọn.</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>Một hoặc nhiều giá trị được chọn không hợp lệ.</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>Lĩnh vực này không được dự kiến.</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>Lĩnh vực này là mất tích.</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>Giá trị không phải là ngày hợp lệ.</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>Giá trị không phải là ngày tháng hợp lệ.</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>Giá trị này không phải là email hợp lệ.</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>Tập tin không tìm thấy.</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>Tập tin không thể đọc được.</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Tập tin quá lớn ({{ size }} {{ suffix }}). Kích thước tối đa cho phép {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>Kiểu mime của tập tin không hợp lệ ({{ type }}). Kiểu hợp lệ là {{ types }}.</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>Giá trị phải bằng hoặc nhỏ hơn {{ limit }}.</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>Giá trị quá dài. Phải bằng hoặc ít hơn {{ limit }} kí tự.|Giá trị quá dài. Phải bằng hoặc ít hơn {{ limit }} kí tự.</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>Giá trị phải lớn hơn hoặc bằng {{ limit }}.</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>Giá trị quá ngắn. Phải hơn hoặc bằng {{ limit }} kí tự.|Giá trị quá ngắn. Phải hơn hoặc bằng {{ limit }} kí tự.</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>Giá trị không được phép để trống.</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>Giá trị không được phép rỗng.</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>Giá trị phải rỗng.</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>Giá trị không hợp lệ.</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>Giá trị không phải là thời gian hợp lệ.</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>Giá trị không phải là địa chỉ URL hợp lệ.</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>Hai giá trị phải bằng nhau.</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>Tập tin quá lớn. Kích thước tối đa cho phép là {{ limit }} {{ suffix }}.</target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>Tập tin quá lớn.</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>Tập tin không thể tải lên.</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>Giá trị phải là con số.</target> + </trans-unit> + <trans-unit id="36"> + <source>This file is not a valid image.</source> + <target>Tập tin không phải là hình ảnh.</target> + </trans-unit> + <trans-unit id="37"> + <source>This is not a valid IP address.</source> + <target>Địa chỉ IP không hợp lệ.</target> + </trans-unit> + <trans-unit id="38"> + <source>This value is not a valid language.</source> + <target>Giá trị không phải là ngôn ngữ hợp lệ.</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid locale.</source> + <target>Giá trị không phải là một bản địa địa phương hợp lệ.</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid country.</source> + <target>Giá trị không phải là nước hợp lệ.</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>Giá trị đã được sử dụng.</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>Kích thước của hình ảnh không thể xác định.</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>Chiều rộng của hình quá lớn ({{ width }}px). Chiều rộng tối đa phải là {{ max_width }}px.</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>Chiều rộng của hình quá thấp ({{ width }}px). Chiều rộng tối thiểu phải là {{ min_width }}px.</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>Chiều cao của hình quá cao ({{ height }}px). Chiều cao tối đa phải là {{ max_height }}px.</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>Chiều cao của hình quá thấp ({{ height }}px). Chiều cao tối thiểu phải là {{ min_height }}px.</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>Giá trị này phải là mật khẩu hiện tại của người dùng.</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>Giá trị phải có chính xác {{ limit }} kí tự.|Giá trị phải có chính xác {{ limit }} kí tự.</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>Tập tin chỉ được tải lên một phần.</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>Tập tin không được tải lên.</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>Thư mục tạm không được định nghĩa trong php.ini.</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>Không thể ghi tập tin tạm ra đĩa.</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>Một PHP extension đã phá hỏng quá trình tải lên của tập tin.</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>Danh sách phải chứa {{ limit }} hoặc nhiều hơn thành phần.|Danh sách phải chứa {{ limit }} hoặc nhiều hơn thành phần.</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>Danh sách phải chứa {{ limit }} hoặc ít hơn thành phần.|Danh sách phải chứa {{ limit }} hoặc ít hơn thành phần.</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>Danh sách phải chứa chính xác {{ limit }} thành phần.|Danh sách phải chứa chính xác {{ limit }} thành phần.</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>Số thẻ không hợp lệ.</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>Thẻ không được hỗ trợ hoặc số thẻ không hợp lệ.</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>Giá trị không phải là International Bank Account Number (IBAN) hợp lệ.</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>Giá trị không phải là ISBN-10 hợp lệ.</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>Giá trị không phải là ISBN-13 hợp lệ.</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>Giá trị không phải là ISBN-10 hoặc ISBN-13 hợp lệ.</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>Giá trị không là ISSN hợp lệ.</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>Giá trị không phải là đơn vi tiền tệ hợp lệ.</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>Giá trị phải bằng {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>Giá trị phải lớn hơn {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>Giá trị phải lớn hơn hoặc bằng {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Giá trị phải giống {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>Giá trị phải bé hơn {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>Giá trị không được phép nhỏ hơn hoặc bằng {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>Giá trị không được phép bằng {{ compared_value }}.</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>Giá trị không được phép giống như {{ compared_value_type }} {{ compared_value }}.</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf new file mode 100644 index 0000000..d4ed03d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>该变量的值应为 false 。</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>该变量的值应为 true 。</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>该变量的类型应为 {{ type }} 。</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>该变量值应为空。</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>选定变量的值不是有效的选项。</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>您至少要选择 {{ limit }} 个选项。</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>您最多能选择 {{ limit }} 个选项。</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>一个或者多个给定的值无效。</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>此字段是多余的。</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>此字段缺失。</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>该值不是一个有效的日期(date)。</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>该值不是一个有效的日期时间(datetime)。</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>该值不是一个有效的邮件地址。</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>文件未找到。</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>文件不可读。</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>文件太大 ({{ size }} {{ suffix }})。文件大小不可以超过 {{ limit }} {{ suffix }} 。</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>无效的文件类型 ({{ type }}) 。允许的文件类型有 {{ types }} 。</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>这个变量的值应该小于或等于 {{ limit }}。</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>字符串太长,长度不可超过 {{ limit }} 个字符。</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>该变量的值应该大于或等于 {{ limit }}。</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>字符串太短,长度不可少于 {{ limit }} 个字符。</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>该变量不应为空。</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>该变量不应为 null 。</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>该变量应为空 null 。</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>该变量值无效 。</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>该值不是一个有效的时间。</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>该值不是一个有效的 URL 。</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>这两个变量的值应该相等。</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>文件太大,文件大小不可以超过 {{ limit }} {{ suffix }}。 </target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>文件太大。</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>无法上传此文件。</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>该值应该为有效的数字。</target> + </trans-unit> + <trans-unit id="36"> + <source>This value is not a valid country.</source> + <target>该值不是有效的国家名。</target> + </trans-unit> + <trans-unit id="37"> + <source>This file is not a valid image.</source> + <target>该文件不是有效的图片。</target> + </trans-unit> + <trans-unit id="38"> + <source>This is not a valid IP address.</source> + <target>该值不是有效的IP地址。</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid language.</source> + <target>该值不是有效的语言名。</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid locale.</source> + <target>该值不是有效的区域值(locale)。</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>该值已经被使用。</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>不能解析图片大小。</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>图片太宽 ({{ width }}px),最大宽度为 {{ max_width }}px 。</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>图片宽度不够 ({{ width }}px),最小宽度为 {{ min_width }}px 。</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>图片太高 ({{ height }}px),最大高度为 {{ max_height }}px 。</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>图片高度不够 ({{ height }}px),最小高度为 {{ min_height }}px 。</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>该变量的值应为用户当前的密码。</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>该变量应为 {{ limit }} 个字符。</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>该文件的上传不完整。</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>没有上传任何文件。</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>php.ini 里没有配置临时文件目录。</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>临时文件写入磁盘失败。</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>某个 PHP 扩展造成上传失败。</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>该集合最少应包含 {{ limit }} 个元素。</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>该集合最多包含 {{ limit }} 个元素。</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>该集合应包含 {{ limit }} 个元素 element 。</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>无效的信用卡号。</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>不支持的信用卡类型或无效的信用卡号。</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>该值不是有效的国际银行帐号(IBAN)。</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>该值不是有效的10位国际标准书号(ISBN-10)。</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>该值不是有效的13位国际标准书号(ISBN-13)。</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>该值不是有效的国际标准书号(ISBN-10 或 ISBN-13)。</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>该值不是有效的国际标准期刊号(ISSN)。</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>该值不是有效的货币名(currency)。</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>该值应等于 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>该值应大于 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>该值应大于或等于 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>该值应与 {{ compared_value_type }} {{ compared_value }} 相同。</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>该值应小于 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>该值应小于或等于 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>该值不应先等于 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>该值不应与 {{ compared_value_type }} {{ compared_value }} 相同。</target> + </trans-unit> + <trans-unit id="73"> + <source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source> + <target>图片宽高比太大 ({{ ratio }})。允许的最大宽高比为 {{ max_ratio }}。</target> + </trans-unit> + <trans-unit id="74"> + <source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source> + <target>图片宽高比太小 ({{ ratio }})。允许的最大宽高比为 {{ min_ratio }}。</target> + </trans-unit> + <trans-unit id="75"> + <source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source> + <target>图片是方形的 ({{ width }}x{{ height }}px)。不允许使用方形的图片。</target> + </trans-unit> + <trans-unit id="76"> + <source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source> + <target>图片是横向的 ({{ width }}x{{ height }}px)。不允许使用横向的图片。</target> + </trans-unit> + <trans-unit id="77"> + <source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source> + <target>图片是纵向的 ({{ width }}x{{ height }}px)。不允许使用纵向的图片。</target> + </trans-unit> + <trans-unit id="78"> + <source>An empty file is not allowed.</source> + <target>不允许使用空文件。</target> + </trans-unit> + <trans-unit id="79"> + <source>The host could not be resolved.</source> + <target>主机名无法解析。</target> + </trans-unit> + <trans-unit id="80"> + <source>This value does not match the expected {{ charset }} charset.</source> + <target>该值不符合 {{ charset }} 编码。</target> + </trans-unit> + <trans-unit id="82"> + <source>Error</source> + <target>错误</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf new file mode 100644 index 0000000..d9d5f2f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf @@ -0,0 +1,283 @@ +<?xml version="1.0"?> +<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> + <file source-language="en" datatype="plaintext" original="file.ext"> + <body> + <trans-unit id="1"> + <source>This value should be false.</source> + <target>該變數的值應為 false 。</target> + </trans-unit> + <trans-unit id="2"> + <source>This value should be true.</source> + <target>該變數的值應為 true 。</target> + </trans-unit> + <trans-unit id="3"> + <source>This value should be of type {{ type }}.</source> + <target>該變數的類型應為 {{ type }} 。</target> + </trans-unit> + <trans-unit id="4"> + <source>This value should be blank.</source> + <target>該變數應為空。</target> + </trans-unit> + <trans-unit id="5"> + <source>The value you selected is not a valid choice.</source> + <target>選定變數的值不是有效的選項。</target> + </trans-unit> + <trans-unit id="6"> + <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> + <target>您至少要選擇 {{ limit }} 個選項。</target> + </trans-unit> + <trans-unit id="7"> + <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> + <target>您最多能選擇 {{ limit }} 個選項。</target> + </trans-unit> + <trans-unit id="8"> + <source>One or more of the given values is invalid.</source> + <target>一個或者多個給定的值無效。</target> + </trans-unit> + <trans-unit id="9"> + <source>This field was not expected.</source> + <target>此字段是沒有預料到。</target> + </trans-unit> + <trans-unit id="10"> + <source>This field is missing.</source> + <target>此字段缺失。</target> + </trans-unit> + <trans-unit id="11"> + <source>This value is not a valid date.</source> + <target>該值不是一個有效的日期(date)。</target> + </trans-unit> + <trans-unit id="12"> + <source>This value is not a valid datetime.</source> + <target>該值不是一個有效的日期時間(datetime)。</target> + </trans-unit> + <trans-unit id="13"> + <source>This value is not a valid email address.</source> + <target>該值不是一個有效的郵件地址。</target> + </trans-unit> + <trans-unit id="14"> + <source>The file could not be found.</source> + <target>找不到檔案。</target> + </trans-unit> + <trans-unit id="15"> + <source>The file is not readable.</source> + <target>無法讀取檔案。</target> + </trans-unit> + <trans-unit id="16"> + <source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>檔案太大 ({{ size }} {{ suffix }})。檔案大小不可以超過 {{ limit }} {{ suffix }} 。</target> + </trans-unit> + <trans-unit id="17"> + <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source> + <target>無效的檔案類型 ({{ type }}) 。允許的檔案類型有 {{ types }} 。</target> + </trans-unit> + <trans-unit id="18"> + <source>This value should be {{ limit }} or less.</source> + <target>這個變數的值應該小於或等於 {{ limit }}。</target> + </trans-unit> + <trans-unit id="19"> + <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> + <target>字串太長,長度不可超過 {{ limit }} 個字元。</target> + </trans-unit> + <trans-unit id="20"> + <source>This value should be {{ limit }} or more.</source> + <target>該變數的值應該大於或等於 {{ limit }}。</target> + </trans-unit> + <trans-unit id="21"> + <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> + <target>字串太短,長度不可少於 {{ limit }} 個字元。</target> + </trans-unit> + <trans-unit id="22"> + <source>This value should not be blank.</source> + <target>該變數不應為空白。</target> + </trans-unit> + <trans-unit id="23"> + <source>This value should not be null.</source> + <target>該值不應為 null 。</target> + </trans-unit> + <trans-unit id="24"> + <source>This value should be null.</source> + <target>該值應為 null 。</target> + </trans-unit> + <trans-unit id="25"> + <source>This value is not valid.</source> + <target>無效的數值 。</target> + </trans-unit> + <trans-unit id="26"> + <source>This value is not a valid time.</source> + <target>該值不是一個有效的時間。</target> + </trans-unit> + <trans-unit id="27"> + <source>This value is not a valid URL.</source> + <target>該值不是一個有效的 URL 。</target> + </trans-unit> + <trans-unit id="31"> + <source>The two values should be equal.</source> + <target>這兩個變數的值應該相等。</target> + </trans-unit> + <trans-unit id="32"> + <source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source> + <target>檔案太大,檔案大小不可以超過 {{ limit }} {{ suffix }}。 </target> + </trans-unit> + <trans-unit id="33"> + <source>The file is too large.</source> + <target>檔案太大。</target> + </trans-unit> + <trans-unit id="34"> + <source>The file could not be uploaded.</source> + <target>無法上傳此檔案。</target> + </trans-unit> + <trans-unit id="35"> + <source>This value should be a valid number.</source> + <target>該值應該為有效的數字。</target> + </trans-unit> + <trans-unit id="36"> + <source>This value is not a valid country.</source> + <target>該值不是有效的國家名。</target> + </trans-unit> + <trans-unit id="37"> + <source>This file is not a valid image.</source> + <target>該檔案不是有效的圖片。</target> + </trans-unit> + <trans-unit id="38"> + <source>This is not a valid IP address.</source> + <target>該值不是有效的IP地址。</target> + </trans-unit> + <trans-unit id="39"> + <source>This value is not a valid language.</source> + <target>該值不是有效的語言名。</target> + </trans-unit> + <trans-unit id="40"> + <source>This value is not a valid locale.</source> + <target>該值不是有效的區域值(locale)。</target> + </trans-unit> + <trans-unit id="41"> + <source>This value is already used.</source> + <target>該值已經被使用。</target> + </trans-unit> + <trans-unit id="42"> + <source>The size of the image could not be detected.</source> + <target>不能解析圖片大小。</target> + </trans-unit> + <trans-unit id="43"> + <source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source> + <target>圖片太寬 ({{ width }}px),最大寬度為 {{ max_width }}px 。</target> + </trans-unit> + <trans-unit id="44"> + <source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source> + <target>圖片寬度不夠 ({{ width }}px),最小寬度為 {{ min_width }}px 。</target> + </trans-unit> + <trans-unit id="45"> + <source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source> + <target>圖片太高 ({{ height }}px),最大高度為 {{ max_height }}px 。</target> + </trans-unit> + <trans-unit id="46"> + <source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source> + <target>圖片高度不夠 ({{ height }}px),最小高度為 {{ min_height }}px 。</target> + </trans-unit> + <trans-unit id="47"> + <source>This value should be the user's current password.</source> + <target>該變數的值應為用戶目前的密碼。</target> + </trans-unit> + <trans-unit id="48"> + <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> + <target>該變數應為 {{ limit }} 個字元。</target> + </trans-unit> + <trans-unit id="49"> + <source>The file was only partially uploaded.</source> + <target>該檔案的上傳不完整。</target> + </trans-unit> + <trans-unit id="50"> + <source>No file was uploaded.</source> + <target>沒有上傳任何檔案。</target> + </trans-unit> + <trans-unit id="51"> + <source>No temporary folder was configured in php.ini.</source> + <target>php.ini 裡沒有配置臨時目錄。</target> + </trans-unit> + <trans-unit id="52"> + <source>Cannot write temporary file to disk.</source> + <target>暫存檔寫入磁碟失敗。</target> + </trans-unit> + <trans-unit id="53"> + <source>A PHP extension caused the upload to fail.</source> + <target>某個 PHP 擴展造成上傳失敗。</target> + </trans-unit> + <trans-unit id="54"> + <source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source> + <target>該集合最少應包含 {{ limit }} 個元素。</target> + </trans-unit> + <trans-unit id="55"> + <source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source> + <target>該集合最多包含 {{ limit }} 個元素。</target> + </trans-unit> + <trans-unit id="56"> + <source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source> + <target>該集合應包含 {{ limit }} 個元素 element 。</target> + </trans-unit> + <trans-unit id="57"> + <source>Invalid card number.</source> + <target>無效的信用卡號。</target> + </trans-unit> + <trans-unit id="58"> + <source>Unsupported card type or invalid card number.</source> + <target>不支援的信用卡類型或無效的信用卡號。</target> + </trans-unit> + <trans-unit id="59"> + <source>This is not a valid International Bank Account Number (IBAN).</source> + <target>該值不是有效的國際銀行帳號(IBAN)。</target> + </trans-unit> + <trans-unit id="60"> + <source>This value is not a valid ISBN-10.</source> + <target>該值不是有效的10位國際標準書號(ISBN-10)。</target> + </trans-unit> + <trans-unit id="61"> + <source>This value is not a valid ISBN-13.</source> + <target>該值不是有效的13位國際標準書號(ISBN-13)。</target> + </trans-unit> + <trans-unit id="62"> + <source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source> + <target>該值不是有效的國際標準書號(ISBN-10 或 ISBN-13)。</target> + </trans-unit> + <trans-unit id="63"> + <source>This value is not a valid ISSN.</source> + <target>該值不是有效的國際標準期刊號(ISSN)。</target> + </trans-unit> + <trans-unit id="64"> + <source>This value is not a valid currency.</source> + <target>該值不是有效的貨幣名(currency)。</target> + </trans-unit> + <trans-unit id="65"> + <source>This value should be equal to {{ compared_value }}.</source> + <target>該值應等於 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="66"> + <source>This value should be greater than {{ compared_value }}.</source> + <target>該值應大於 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="67"> + <source>This value should be greater than or equal to {{ compared_value }}.</source> + <target>該值應大於或等於 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="68"> + <source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>該值應與 {{ compared_value_type }} {{ compared_value }} 相同。</target> + </trans-unit> + <trans-unit id="69"> + <source>This value should be less than {{ compared_value }}.</source> + <target>該值應小於 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="70"> + <source>This value should be less than or equal to {{ compared_value }}.</source> + <target>該值應小於或等於 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="71"> + <source>This value should not be equal to {{ compared_value }}.</source> + <target>該值應不等於 {{ compared_value }} 。</target> + </trans-unit> + <trans-unit id="72"> + <source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source> + <target>該值不應與 {{ compared_value_type }} {{ compared_value }} 相同。</target> + </trans-unit> + </body> + </file> +</xliff> diff --git a/public/system/storage/vendor/symfony/validator/Tests/ConstraintTest.php b/public/system/storage/vendor/symfony/validator/Tests/ConstraintTest.php new file mode 100644 index 0000000..a057414 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/ConstraintTest.php @@ -0,0 +1,245 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Tests\Fixtures\ClassConstraint; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintC; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithValue; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithValueAsDefault; + +class ConstraintTest extends TestCase +{ + public function testSetProperties() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + )); + + $this->assertEquals('foo', $constraint->property1); + $this->assertEquals('bar', $constraint->property2); + } + + public function testSetNotExistingPropertyThrowsException() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); + + new ConstraintA(array( + 'foo' => 'bar', + )); + } + + public function testMagicPropertiesAreNotAllowed() + { + $constraint = new ConstraintA(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); + + $constraint->foo = 'bar'; + } + + public function testInvalidAndRequiredOptionsPassed() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); + + new ConstraintC(array( + 'option1' => 'default', + 'foo' => 'bar', + )); + } + + public function testSetDefaultProperty() + { + $constraint = new ConstraintA('foo'); + + $this->assertEquals('foo', $constraint->property2); + } + + public function testSetDefaultPropertyDoctrineStyle() + { + $constraint = new ConstraintA(array('value' => 'foo')); + + $this->assertEquals('foo', $constraint->property2); + } + + public function testSetDefaultPropertyDoctrineStylePlusOtherProperty() + { + $constraint = new ConstraintA(array('value' => 'foo', 'property1' => 'bar')); + + $this->assertEquals('foo', $constraint->property2); + $this->assertEquals('bar', $constraint->property1); + } + + public function testSetDefaultPropertyDoctrineStyleWhenDefaultPropertyIsNamedValue() + { + $constraint = new ConstraintWithValueAsDefault(array('value' => 'foo')); + + $this->assertEquals('foo', $constraint->value); + $this->assertNull($constraint->property); + } + + public function testDontSetDefaultPropertyIfValuePropertyExists() + { + $constraint = new ConstraintWithValue(array('value' => 'foo')); + + $this->assertEquals('foo', $constraint->value); + $this->assertNull($constraint->property); + } + + public function testSetUndefinedDefaultProperty() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + new ConstraintB('foo'); + } + + public function testRequiredOptionsMustBeDefined() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\MissingOptionsException'); + + new ConstraintC(); + } + + public function testRequiredOptionsPassed() + { + $constraint = new ConstraintC(array('option1' => 'default')); + + $this->assertSame('default', $constraint->option1); + } + + public function testGroupsAreConvertedToArray() + { + $constraint = new ConstraintA(array('groups' => 'Foo')); + + $this->assertEquals(array('Foo'), $constraint->groups); + } + + public function testAddDefaultGroupAddsGroup() + { + $constraint = new ConstraintA(array('groups' => 'Default')); + $constraint->addImplicitGroupName('Foo'); + $this->assertEquals(array('Default', 'Foo'), $constraint->groups); + } + + public function testAllowsSettingZeroRequiredPropertyValue() + { + $constraint = new ConstraintA(0); + $this->assertEquals(0, $constraint->property2); + } + + public function testCanCreateConstraintWithNoDefaultOptionAndEmptyArray() + { + $constraint = new ConstraintB(array()); + + $this->assertSame(array(Constraint::PROPERTY_CONSTRAINT, Constraint::CLASS_CONSTRAINT), $constraint->getTargets()); + } + + public function testGetTargetsCanBeString() + { + $constraint = new ClassConstraint(); + + $this->assertEquals('class', $constraint->getTargets()); + } + + public function testGetTargetsCanBeArray() + { + $constraint = new ConstraintA(); + + $this->assertEquals(array('property', 'class'), $constraint->getTargets()); + } + + public function testSerialize() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + )); + + $restoredConstraint = unserialize(serialize($constraint)); + + $this->assertEquals($constraint, $restoredConstraint); + } + + public function testSerializeInitializesGroupsOptionToDefault() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + )); + + $constraint = unserialize(serialize($constraint)); + + $expected = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + 'groups' => 'Default', + )); + + $this->assertEquals($expected, $constraint); + } + + public function testSerializeKeepsCustomGroups() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + 'groups' => 'MyGroup', + )); + + $constraint = unserialize(serialize($constraint)); + + $this->assertSame(array('MyGroup'), $constraint->groups); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\InvalidArgumentException + */ + public function testGetErrorNameForUnknownCode() + { + Constraint::getErrorName(1); + } + + public function testOptionsAsDefaultOption() + { + $constraint = new ConstraintA($options = array('value1')); + + $this->assertEquals($options, $constraint->property2); + + $constraint = new ConstraintA($options = array('value1', 'property1' => 'value2')); + + $this->assertEquals($options, $constraint->property2); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\InvalidOptionsException + * @expectedExceptionMessage The options "0", "5" do not exist + */ + public function testInvalidOptions() + { + new ConstraintA(array('property2' => 'foo', 'bar', 5 => 'baz')); + } + + public function testOptionsWithInvalidInternalPointer() + { + $options = array('property1' => 'foo'); + next($options); + next($options); + + $constraint = new ConstraintA($options); + + $this->assertEquals('foo', $constraint->property1); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationListTest.php b/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationListTest.php new file mode 100644 index 0000000..a35a1cd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationListTest.php @@ -0,0 +1,135 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; + +class ConstraintViolationListTest extends TestCase +{ + protected $list; + + protected function setUp() + { + $this->list = new ConstraintViolationList(); + } + + protected function tearDown() + { + $this->list = null; + } + + public function testInit() + { + $this->assertCount(0, $this->list); + } + + public function testInitWithViolations() + { + $violation = $this->getViolation('Error'); + $this->list = new ConstraintViolationList(array($violation)); + + $this->assertCount(1, $this->list); + $this->assertSame($violation, $this->list[0]); + } + + public function testAdd() + { + $violation = $this->getViolation('Error'); + $this->list->add($violation); + + $this->assertCount(1, $this->list); + $this->assertSame($violation, $this->list[0]); + } + + public function testAddAll() + { + $violations = array( + 10 => $this->getViolation('Error 1'), + 20 => $this->getViolation('Error 2'), + 30 => $this->getViolation('Error 3'), + ); + $otherList = new ConstraintViolationList($violations); + $this->list->addAll($otherList); + + $this->assertCount(3, $this->list); + + $this->assertSame($violations[10], $this->list[0]); + $this->assertSame($violations[20], $this->list[1]); + $this->assertSame($violations[30], $this->list[2]); + } + + public function testIterator() + { + $violations = array( + 10 => $this->getViolation('Error 1'), + 20 => $this->getViolation('Error 2'), + 30 => $this->getViolation('Error 3'), + ); + + $this->list = new ConstraintViolationList($violations); + + // indices are reset upon adding -> array_values() + $this->assertSame(array_values($violations), iterator_to_array($this->list)); + } + + public function testArrayAccess() + { + $violation = $this->getViolation('Error'); + $this->list[] = $violation; + + $this->assertSame($violation, $this->list[0]); + $this->assertArrayHasKey(0, $this->list); + + unset($this->list[0]); + + $this->assertArrayNotHasKey(0, $this->list); + + $this->list[10] = $violation; + + $this->assertSame($violation, $this->list[10]); + $this->assertArrayHasKey(10, $this->list); + } + + public function testToString() + { + $this->list = new ConstraintViolationList(array( + $this->getViolation('Error 1', 'Root'), + $this->getViolation('Error 2', 'Root', 'foo.bar'), + $this->getViolation('Error 3', 'Root', '[baz]'), + $this->getViolation('Error 4', '', 'foo.bar'), + $this->getViolation('Error 5', '', '[baz]'), + )); + + $expected = <<<'EOF' +Root: + Error 1 +Root.foo.bar: + Error 2 +Root[baz]: + Error 3 +foo.bar: + Error 4 +[baz]: + Error 5 + +EOF; + + $this->assertEquals($expected, (string) $this->list); + } + + protected function getViolation($message, $root = null, $propertyPath = null) + { + return new ConstraintViolation($message, $message, array(), $root, $propertyPath, null); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationTest.php b/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationTest.php new file mode 100644 index 0000000..cef4782 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationTest.php @@ -0,0 +1,56 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\ConstraintViolation; + +class ConstraintViolationTest extends TestCase +{ + public function testToStringHandlesArrays() + { + $violation = new ConstraintViolation( + 'Array', + '{{ value }}', + array('{{ value }}' => array(1, 2, 3)), + 'Root', + 'property.path', + null + ); + + $expected = <<<'EOF' +Root.property.path: + Array +EOF; + + $this->assertSame($expected, (string) $violation); + } + + public function testToStringHandlesArrayRoots() + { + $violation = new ConstraintViolation( + '42 cannot be used here', + 'this is the message template', + array(), + array('some_value' => 42), + 'some_value', + null + ); + + $expected = <<<'EOF' +Array.some_value: + 42 cannot be used here +EOF; + + $this->assertSame($expected, (string) $violation); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php new file mode 100644 index 0000000..d593aac --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php @@ -0,0 +1,192 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraint; + +class ComparisonTest_Class +{ + protected $value; + + public function __construct($value) + { + $this->value = $value; + } + + public function __toString() + { + return (string) $this->value; + } +} + +/** + * @author Daniel Holmes <daniel@danielholmes.org> + */ +abstract class AbstractComparisonValidatorTestCase extends AbstractConstraintValidatorTest +{ + protected static function addPhp5Dot5Comparisons(array $comparisons) + { + if (\PHP_VERSION_ID < 50500) { + return $comparisons; + } + + $result = $comparisons; + + // Duplicate all tests involving DateTime objects to be tested with + // DateTimeImmutable objects as well + foreach ($comparisons as $comparison) { + $add = false; + + foreach ($comparison as $i => $value) { + if ($value instanceof \DateTime) { + $comparison[$i] = new \DateTimeImmutable( + $value->format('Y-m-d H:i:s.u e'), + $value->getTimezone() + ); + $add = true; + } elseif ('DateTime' === $value) { + $comparison[$i] = 'DateTimeImmutable'; + $add = true; + } + } + + if ($add) { + $result[] = $comparison; + } + } + + return $result; + } + + public function provideInvalidConstraintOptions() + { + return array( + array(null), + array(array()), + ); + } + + /** + * @dataProvider provideInvalidConstraintOptions + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testThrowsConstraintExceptionIfNoValueOrProperty($options) + { + $this->createConstraint($options); + } + + /** + * @dataProvider provideAllValidComparisons + * + * @param mixed $dirtyValue + * @param mixed $comparisonValue + */ + public function testValidComparisonToValue($dirtyValue, $comparisonValue) + { + $constraint = $this->createConstraint(array('value' => $comparisonValue)); + + $this->validator->validate($dirtyValue, $constraint); + + $this->assertNoViolation(); + } + + /** + * @return array + */ + public function provideAllValidComparisons() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $comparisons = self::addPhp5Dot5Comparisons($this->provideValidComparisons()); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * @return array + */ + abstract public function provideValidComparisons(); + + /** + * @dataProvider provideAllInvalidComparisons + * + * @param mixed $dirtyValue + * @param mixed $dirtyValueAsString + * @param mixed $comparedValue + * @param mixed $comparedValueString + * @param string $comparedValueType + */ + public function testInvalidComparisonToValue($dirtyValue, $dirtyValueAsString, $comparedValue, $comparedValueString, $comparedValueType) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + if ($dirtyValue instanceof \DateTime || $dirtyValue instanceof \DateTimeInterface) { + IntlTestHelper::requireIntl($this, '57.1'); + + if (\PHP_VERSION_ID < 50304 && !(\extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { + $this->markTestSkipped('Intl supports formatting DateTime objects since 5.3.4'); + } + } + + $constraint = $this->createConstraint(array('value' => $comparedValue)); + $constraint->message = 'Constraint Message'; + + $this->validator->validate($dirtyValue, $constraint); + + $this->buildViolation('Constraint Message') + ->setParameter('{{ value }}', $dirtyValueAsString) + ->setParameter('{{ compared_value }}', $comparedValueString) + ->setParameter('{{ compared_value_type }}', $comparedValueType) + ->setCode($this->getErrorCode()) + ->assertRaised(); + } + + /** + * @return array + */ + public function provideAllInvalidComparisons() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $comparisons = self::addPhp5Dot5Comparisons($this->provideInvalidComparisons()); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * @return array + */ + abstract public function provideInvalidComparisons(); + + /** + * @param array|null $options Options for the constraint + * + * @return Constraint + */ + abstract protected function createConstraint(array $options = null); + + /** + * @return string|null + */ + protected function getErrorCode() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php new file mode 100644 index 0000000..fe505c0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php @@ -0,0 +1,441 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\Assert; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\ConstraintValidatorInterface; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\Context\ExecutionContext; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Context\LegacyExecutionContext; +use Symfony\Component\Validator\ExecutionContextInterface as LegacyExecutionContextInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\PropertyMetadata; +use Symfony\Component\Validator\Validation; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class AbstractConstraintValidatorTest extends TestCase +{ + /** + * @var ExecutionContextInterface + */ + protected $context; + + /** + * @var ConstraintValidatorInterface + */ + protected $validator; + + protected $group; + protected $metadata; + protected $object; + protected $value; + protected $root; + protected $propertyPath; + protected $constraint; + protected $defaultTimezone; + + protected function setUp() + { + $this->group = 'MyGroup'; + $this->metadata = null; + $this->object = null; + $this->value = 'InvalidValue'; + $this->root = 'root'; + $this->propertyPath = 'property.path'; + + // Initialize the context with some constraint so that we can + // successfully build a violation. + $this->constraint = new NotNull(); + + $this->context = $this->createContext(); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + \Locale::setDefault('en'); + + $this->setDefaultTimezone('UTC'); + } + + protected function tearDown() + { + $this->restoreDefaultTimezone(); + } + + protected function setDefaultTimezone($defaultTimezone) + { + // Make sure this method can not be called twice before calling + // also restoreDefaultTimezone() + if (null === $this->defaultTimezone) { + $this->defaultTimezone = date_default_timezone_get(); + date_default_timezone_set($defaultTimezone); + } + } + + protected function restoreDefaultTimezone() + { + if (null !== $this->defaultTimezone) { + date_default_timezone_set($this->defaultTimezone); + $this->defaultTimezone = null; + } + } + + protected function createContext() + { + $translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock(); + $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); + $contextualValidator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); + + switch ($this->getApiVersion()) { + case Validation::API_VERSION_2_5: + $context = new ExecutionContext( + $validator, + $this->root, + $translator + ); + break; + case Validation::API_VERSION_2_4: + case Validation::API_VERSION_2_5_BC: + $context = new LegacyExecutionContext( + $validator, + $this->root, + $this->getMockBuilder('Symfony\Component\Validator\MetadataFactoryInterface')->getMock(), + $translator + ); + break; + default: + throw new \RuntimeException('Invalid API version'); + } + + $context->setGroup($this->group); + $context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + $context->setConstraint($this->constraint); + + $validator->expects($this->any()) + ->method('inContext') + ->with($context) + ->will($this->returnValue($contextualValidator)); + + return $context; + } + + /** + * @param mixed $message + * @param array $parameters + * @param string $propertyPath + * @param string $invalidValue + * @param null $plural + * @param null $code + * + * @return ConstraintViolation + * + * @deprecated to be removed in Symfony 3.0. Use {@link buildViolation()} instead. + */ + protected function createViolation($message, array $parameters = array(), $propertyPath = 'property.path', $invalidValue = 'InvalidValue', $plural = null, $code = null) + { + return new ConstraintViolation( + null, + $message, + $parameters, + $this->root, + $propertyPath, + $invalidValue, + $plural, + $code, + $this->constraint + ); + } + + protected function setGroup($group) + { + $this->group = $group; + $this->context->setGroup($group); + } + + protected function setObject($object) + { + $this->object = $object; + $this->metadata = \is_object($object) + ? new ClassMetadata(\get_class($object)) + : null; + + $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + } + + protected function setProperty($object, $property) + { + $this->object = $object; + $this->metadata = \is_object($object) + ? new PropertyMetadata(\get_class($object), $property) + : null; + + $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + } + + protected function setValue($value) + { + $this->value = $value; + $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + } + + protected function setRoot($root) + { + $this->root = $root; + $this->context = $this->createContext(); + $this->validator->initialize($this->context); + } + + protected function setPropertyPath($propertyPath) + { + $this->propertyPath = $propertyPath; + $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + } + + protected function expectNoValidate() + { + $validator = $this->context->getValidator()->inContext($this->context); + $validator->expects($this->never()) + ->method('atPath'); + $validator->expects($this->never()) + ->method('validate'); + } + + protected function expectValidateAt($i, $propertyPath, $value, $group) + { + $validator = $this->context->getValidator()->inContext($this->context); + $validator->expects($this->at(2 * $i)) + ->method('atPath') + ->with($propertyPath) + ->will($this->returnValue($validator)); + $validator->expects($this->at(2 * $i + 1)) + ->method('validate') + ->with($value, $this->logicalOr(null, array(), $this->isInstanceOf('\Symfony\Component\Validator\Constraints\Valid')), $group); + } + + protected function expectValidateValueAt($i, $propertyPath, $value, $constraints, $group = null) + { + $contextualValidator = $this->context->getValidator()->inContext($this->context); + $contextualValidator->expects($this->at(2 * $i)) + ->method('atPath') + ->with($propertyPath) + ->will($this->returnValue($contextualValidator)); + $contextualValidator->expects($this->at(2 * $i + 1)) + ->method('validate') + ->with($value, $constraints, $group); + } + + protected function assertNoViolation() + { + $this->assertSame(0, $violationsCount = \count($this->context->getViolations()), sprintf('0 violation expected. Got %u.', $violationsCount)); + } + + /** + * @param mixed $message + * @param array $parameters + * @param string $propertyPath + * @param string $invalidValue + * @param null $plural + * @param null $code + * + * @deprecated To be removed in Symfony 3.0. Use + * {@link buildViolation()} instead. + */ + protected function assertViolation($message, array $parameters = array(), $propertyPath = 'property.path', $invalidValue = 'InvalidValue', $plural = null, $code = null) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); + + $this->buildViolation($message) + ->setParameters($parameters) + ->atPath($propertyPath) + ->setInvalidValue($invalidValue) + ->setCode($code) + ->setPlural($plural) + ->assertRaised(); + } + + /** + * @param array $expected + * + * @deprecated To be removed in Symfony 3.0. Use + * {@link buildViolation()} instead. + */ + protected function assertViolations(array $expected) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); + + $violations = $this->context->getViolations(); + + $this->assertCount(\count($expected), $violations); + + $i = 0; + + foreach ($expected as $violation) { + $this->assertEquals($violation, $violations[$i++]); + } + } + + /** + * @param $message + * + * @return ConstraintViolationAssertion + */ + protected function buildViolation($message) + { + return new ConstraintViolationAssertion($this->context, $message, $this->constraint); + } + + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + abstract protected function createValidator(); +} + +/** + * @internal + */ +class ConstraintViolationAssertion +{ + /** + * @var LegacyExecutionContextInterface + */ + private $context; + + /** + * @var ConstraintViolationAssertion[] + */ + private $assertions; + + private $message; + private $parameters = array(); + private $invalidValue = 'InvalidValue'; + private $propertyPath = 'property.path'; + private $translationDomain; + private $plural; + private $code; + private $constraint; + private $cause; + + public function __construct(LegacyExecutionContextInterface $context, $message, Constraint $constraint = null, array $assertions = array()) + { + $this->context = $context; + $this->message = $message; + $this->constraint = $constraint; + $this->assertions = $assertions; + } + + public function atPath($path) + { + $this->propertyPath = $path; + + return $this; + } + + public function setParameter($key, $value) + { + $this->parameters[$key] = $value; + + return $this; + } + + public function setParameters(array $parameters) + { + $this->parameters = $parameters; + + return $this; + } + + public function setTranslationDomain($translationDomain) + { + $this->translationDomain = $translationDomain; + + return $this; + } + + public function setInvalidValue($invalidValue) + { + $this->invalidValue = $invalidValue; + + return $this; + } + + public function setPlural($number) + { + $this->plural = $number; + + return $this; + } + + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + public function setCause($cause) + { + $this->cause = $cause; + + return $this; + } + + public function buildNextViolation($message) + { + $assertions = $this->assertions; + $assertions[] = $this; + + return new self($this->context, $message, $this->constraint, $assertions); + } + + public function assertRaised() + { + $expected = array(); + foreach ($this->assertions as $assertion) { + $expected[] = $assertion->getViolation(); + } + $expected[] = $this->getViolation(); + + $violations = iterator_to_array($this->context->getViolations()); + + Assert::assertSame($expectedCount = \count($expected), $violationsCount = \count($violations), sprintf('%u violation(s) expected. Got %u.', $expectedCount, $violationsCount)); + + reset($violations); + + foreach ($expected as $violation) { + Assert::assertEquals($violation, current($violations)); + next($violations); + } + } + + private function getViolation() + { + return new ConstraintViolation( + null, + $this->message, + $this->parameters, + $this->context->getRoot(), + $this->propertyPath, + $this->invalidValue, + $this->plural, + $this->code, + $this->constraint, + $this->cause + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllTest.php new file mode 100644 index 0000000..25e71a1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllTest.php @@ -0,0 +1,42 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class AllTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectNonConstraints() + { + new All(array( + 'foo', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraint() + { + new All(array( + new Valid(), + )); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllValidatorTest.php new file mode 100644 index 0000000..57dd600 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllValidatorTest.php @@ -0,0 +1,93 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\AllValidator; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Validation; + +class AllValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new AllValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new All(new Range(array('min' => 4)))); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testThrowsExceptionIfNotTraversable() + { + $this->validator->validate('foo.barbar', new All(new Range(array('min' => 4)))); + } + + /** + * @dataProvider getValidArguments + */ + public function testWalkSingleConstraint($array) + { + $constraint = new Range(array('min' => 4)); + + $i = 0; + + foreach ($array as $key => $value) { + $this->expectValidateValueAt($i++, '['.$key.']', $value, array($constraint)); + } + + $this->validator->validate($array, new All($constraint)); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidArguments + */ + public function testWalkMultipleConstraints($array) + { + $constraint1 = new Range(array('min' => 4)); + $constraint2 = new NotNull(); + + $constraints = array($constraint1, $constraint2); + + $i = 0; + + foreach ($array as $key => $value) { + $this->expectValidateValueAt($i++, '['.$key.']', $value, array($constraint1, $constraint2)); + } + + $this->validator->validate($array, new All($constraints)); + + $this->assertNoViolation(); + } + + public function getValidArguments() + { + return array( + array(array(5, 6, 7)), + array(new \ArrayObject(array(5, 6, 7))), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/BicValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/BicValidatorTest.php new file mode 100644 index 0000000..0646e44 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/BicValidatorTest.php @@ -0,0 +1,106 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Bic; +use Symfony\Component\Validator\Constraints\BicValidator; + +class BicValidatorTest extends AbstractConstraintValidatorTest +{ + protected function createValidator() + { + return new BicValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Bic()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Bic()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidBics + */ + public function testValidBics($bic) + { + $this->validator->validate($bic, new Bic()); + + $this->assertNoViolation(); + } + + public function getValidBics() + { + // http://formvalidation.io/validators/bic/ + return array( + array('ASPKAT2LXXX'), + array('ASPKAT2L'), + array('DSBACNBXSHA'), + array('UNCRIT2B912'), + array('DABADKKK'), + array('RZOOAT2L303'), + ); + } + + /** + * @dataProvider getInvalidBics + */ + public function testInvalidBics($bic, $code) + { + $constraint = new Bic(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($bic, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$bic.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidBics() + { + return array( + array('DEUTD', Bic::INVALID_LENGTH_ERROR), + array('ASPKAT2LXX', Bic::INVALID_LENGTH_ERROR), + array('ASPKAT2LX', Bic::INVALID_LENGTH_ERROR), + array('ASPKAT2LXXX1', Bic::INVALID_LENGTH_ERROR), + array('DABADKK', Bic::INVALID_LENGTH_ERROR), + array('1SBACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('RZ00AT2L303', Bic::INVALID_BANK_CODE_ERROR), + array('D2BACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('DS3ACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('DSB4CNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('DEUT12HH', Bic::INVALID_COUNTRY_CODE_ERROR), + array('DSBAC6BXSHA', Bic::INVALID_COUNTRY_CODE_ERROR), + array('DSBA5NBXSHA', Bic::INVALID_COUNTRY_CODE_ERROR), + + // branch code error + array('THISSVAL1D]', Bic::INVALID_CHARACTERS_ERROR), + + // location code error + array('DEUTDEF]', Bic::INVALID_CHARACTERS_ERROR), + + // lower case values are invalid + array('DeutAT2LXXX', Bic::INVALID_CASE_ERROR), + array('DEUTAT2lxxx', Bic::INVALID_CASE_ERROR), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/BlankValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/BlankValidatorTest.php new file mode 100644 index 0000000..17d8bfb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/BlankValidatorTest.php @@ -0,0 +1,70 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Blank; +use Symfony\Component\Validator\Constraints\BlankValidator; +use Symfony\Component\Validator\Validation; + +class BlankValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new BlankValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Blank()); + + $this->assertNoViolation(); + } + + public function testBlankIsValid() + { + $this->validator->validate('', new Blank()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidValues + */ + public function testInvalidValues($value, $valueAsString) + { + $constraint = new Blank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $valueAsString) + ->setCode(Blank::NOT_BLANK_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array('foobar', '"foobar"'), + array(0, '0'), + array(false, 'false'), + array(1234, '1234'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CallbackValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CallbackValidatorTest.php new file mode 100644 index 0000000..e87c9c4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CallbackValidatorTest.php @@ -0,0 +1,351 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\CallbackValidator; +use Symfony\Component\Validator\ExecutionContextInterface; +use Symfony\Component\Validator\Validation; + +class CallbackValidatorTest_Class +{ + public static function validateCallback($object, ExecutionContextInterface $context) + { + $context->addViolation('Callback message', array('{{ value }}' => 'foobar')); + + return false; + } +} + +class CallbackValidatorTest_Object +{ + public function validate(ExecutionContextInterface $context) + { + $context->addViolation('My message', array('{{ value }}' => 'foobar')); + + return false; + } + + public static function validateStatic($object, ExecutionContextInterface $context) + { + $context->addViolation('Static message', array('{{ value }}' => 'baz')); + + return false; + } +} + +class CallbackValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new CallbackValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Callback()); + + $this->assertNoViolation(); + } + + public function testSingleMethod() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback('validate'); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testSingleMethodExplicitName() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array('callback' => 'validate')); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testSingleStaticMethod() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback('validateStatic'); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('Static message') + ->setParameter('{{ value }}', 'baz') + ->assertRaised(); + } + + public function testClosure() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(function ($object, ExecutionContextInterface $context) { + $context->addViolation('My message', array('{{ value }}' => 'foobar')); + + return false; + }); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testClosureNullObject() + { + $constraint = new Callback(function ($object, ExecutionContextInterface $context) { + $context->addViolation('My message', array('{{ value }}' => 'foobar')); + + return false; + }); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testClosureExplicitName() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array( + 'callback' => function ($object, ExecutionContextInterface $context) { + $context->addViolation('My message', array('{{ value }}' => 'foobar')); + + return false; + }, + )); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testArrayCallable() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array(__CLASS__.'_Class', 'validateCallback')); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('Callback message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testArrayCallableNullObject() + { + $constraint = new Callback(array(__CLASS__.'_Class', 'validateCallback')); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('Callback message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testArrayCallableExplicitName() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array( + 'callback' => array(__CLASS__.'_Class', 'validateCallback'), + )); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('Callback message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + /** + * @group legacy + */ + public function testLegacySingleMethodBc() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array('validate')); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + /** + * @group legacy + */ + public function testLegacySingleMethodBcExplicitName() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array('methods' => array('validate'))); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + /** + * @group legacy + */ + public function testLegacyMultipleMethodsBc() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array('validate', 'validateStatic')); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->buildNextViolation('Static message') + ->setParameter('{{ value }}', 'baz') + ->assertRaised(); + } + + /** + * @group legacy + */ + public function testLegacyMultipleMethodsBcExplicitName() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array( + 'methods' => array('validate', 'validateStatic'), + )); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->buildNextViolation('Static message') + ->setParameter('{{ value }}', 'baz') + ->assertRaised(); + } + + /** + * @group legacy + */ + public function testLegacySingleStaticMethodBc() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array( + array(__CLASS__.'_Class', 'validateCallback'), + )); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('Callback message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + /** + * @group legacy + */ + public function testLegacySingleStaticMethodBcExplicitName() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array( + 'methods' => array(array(__CLASS__.'_Class', 'validateCallback')), + )); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('Callback message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testExpectValidMethods() + { + $object = new CallbackValidatorTest_Object(); + + $this->validator->validate($object, new Callback(array('callback' => array('foobar')))); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testExpectValidCallbacks() + { + $object = new CallbackValidatorTest_Object(); + + $this->validator->validate($object, new Callback(array('callback' => array('foo', 'bar')))); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + * @group legacy + */ + public function testLegacyExpectEitherCallbackOrMethods() + { + $object = new CallbackValidatorTest_Object(); + + $this->validator->validate($object, new Callback(array( + 'callback' => 'validate', + 'methods' => array('validateStatic'), + ))); + } + + public function testConstraintGetTargets() + { + $constraint = new Callback(array()); + $targets = array(Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT); + + $this->assertEquals($targets, $constraint->getTargets()); + } + + // Should succeed. Needed when defining constraints as annotations. + public function testNoConstructorArguments() + { + $constraint = new Callback(); + + $this->assertSame(array(Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT), $constraint->getTargets()); + } + + public function testAnnotationInvocationSingleValued() + { + $constraint = new Callback(array('value' => 'validateStatic')); + + $this->assertEquals(new Callback('validateStatic'), $constraint); + } + + public function testAnnotationInvocationMultiValued() + { + $constraint = new Callback(array('value' => array(__CLASS__.'_Class', 'validateCallback'))); + + $this->assertEquals(new Callback(array(__CLASS__.'_Class', 'validateCallback')), $constraint); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CardSchemeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CardSchemeValidatorTest.php new file mode 100644 index 0000000..22c9644 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CardSchemeValidatorTest.php @@ -0,0 +1,143 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\CardScheme; +use Symfony\Component\Validator\Constraints\CardSchemeValidator; +use Symfony\Component\Validator\Validation; + +class CardSchemeValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new CardSchemeValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new CardScheme(array('schemes' => array()))); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new CardScheme(array('schemes' => array()))); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidNumbers + */ + public function testValidNumbers($scheme, $number) + { + $this->validator->validate($number, new CardScheme(array('schemes' => $scheme))); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidNumbers + */ + public function testInvalidNumbers($scheme, $number, $code) + { + $constraint = new CardScheme(array( + 'schemes' => $scheme, + 'message' => 'myMessage', + )); + + $this->validator->validate($number, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', \is_string($number) ? '"'.$number.'"' : $number) + ->setCode($code) + ->assertRaised(); + } + + public function getValidNumbers() + { + return array( + array('AMEX', '378282246310005'), + array('AMEX', '371449635398431'), + array('AMEX', '378734493671000'), + array('AMEX', '347298508610146'), + array('CHINA_UNIONPAY', '6228888888888888'), + array('CHINA_UNIONPAY', '62288888888888888'), + array('CHINA_UNIONPAY', '622888888888888888'), + array('CHINA_UNIONPAY', '6228888888888888888'), + array('DINERS', '30569309025904'), + array('DINERS', '36088894118515'), + array('DINERS', '38520000023237'), + array('DISCOVER', '6011111111111117'), + array('DISCOVER', '6011000990139424'), + array('INSTAPAYMENT', '6372476031350068'), + array('INSTAPAYMENT', '6385537775789749'), + array('INSTAPAYMENT', '6393440808445746'), + array('JCB', '3530111333300000'), + array('JCB', '3566002020360505'), + array('JCB', '213112345678901'), + array('JCB', '180012345678901'), + array('LASER', '6304678107004080'), + array('LASER', '6706440607428128629'), + array('LASER', '6771656738314582216'), + array('MAESTRO', '6759744069209'), + array('MAESTRO', '5020507657408074712'), + array('MAESTRO', '5612559223580173965'), + array('MAESTRO', '6759744069209'), + array('MAESTRO', '6594371785970435599'), + array('MASTERCARD', '5555555555554444'), + array('MASTERCARD', '5105105105105100'), + array('MASTERCARD', '2221005555554444'), + array('MASTERCARD', '2230000000000000'), + array('MASTERCARD', '2300000000000000'), + array('MASTERCARD', '2699999999999999'), + array('MASTERCARD', '2709999999999999'), + array('MASTERCARD', '2720995105105100'), + array('VISA', '4111111111111111'), + array('VISA', '4012888888881881'), + array('VISA', '4222222222222'), + array('VISA', '4917610000000000003'), + array(array('AMEX', 'VISA'), '4111111111111111'), + array(array('AMEX', 'VISA'), '378282246310005'), + array(array('JCB', 'MASTERCARD'), '5105105105105100'), + array(array('VISA', 'MASTERCARD'), '5105105105105100'), + ); + } + + public function getInvalidNumbers() + { + return array( + array('VISA', '42424242424242424242', CardScheme::INVALID_FORMAT_ERROR), + array('AMEX', '357298508610146', CardScheme::INVALID_FORMAT_ERROR), + array('DINERS', '31569309025904', CardScheme::INVALID_FORMAT_ERROR), + array('DINERS', '37088894118515', CardScheme::INVALID_FORMAT_ERROR), + array('INSTAPAYMENT', '6313440808445746', CardScheme::INVALID_FORMAT_ERROR), + array('CHINA_UNIONPAY', '622888888888888', CardScheme::INVALID_FORMAT_ERROR), + array('CHINA_UNIONPAY', '62288888888888888888', CardScheme::INVALID_FORMAT_ERROR), + array('AMEX', '30569309025904', CardScheme::INVALID_FORMAT_ERROR), // DINERS number + array('AMEX', 'invalid', CardScheme::NOT_NUMERIC_ERROR), // A string + array('AMEX', 0, CardScheme::INVALID_FORMAT_ERROR), // a lone number + array('AMEX', '0', CardScheme::INVALID_FORMAT_ERROR), // a lone number + array('AMEX', '000000000000', CardScheme::INVALID_FORMAT_ERROR), // a lone number + array('DINERS', '3056930', CardScheme::INVALID_FORMAT_ERROR), // only first part of the number + array('DISCOVER', '1117', CardScheme::INVALID_FORMAT_ERROR), // only last 4 digits + array('MASTERCARD', '2721001234567890', CardScheme::INVALID_FORMAT_ERROR), // Not assigned yet + array('MASTERCARD', '2220991234567890', CardScheme::INVALID_FORMAT_ERROR), // Not assigned yet + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php new file mode 100644 index 0000000..b515b84 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php @@ -0,0 +1,304 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\ChoiceValidator; +use Symfony\Component\Validator\Validation; + +function choice_callback() +{ + return array('foo', 'bar'); +} + +class ChoiceValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new ChoiceValidator(); + } + + public static function staticCallback() + { + return array('foo', 'bar'); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectArrayIfMultipleIsTrue() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar'), + 'multiple' => true, + )); + + $this->validator->validate('asdf', $constraint); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Choice(array('choices' => array('foo', 'bar')))); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testChoicesOrCallbackExpected() + { + $this->validator->validate('foobar', new Choice()); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testValidCallbackExpected() + { + $this->validator->validate('foobar', new Choice(array('callback' => 'abcd'))); + } + + public function testValidChoiceArray() + { + $constraint = new Choice(array('choices' => array('foo', 'bar'))); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testValidChoiceCallbackFunction() + { + $constraint = new Choice(array('callback' => __NAMESPACE__.'\choice_callback')); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testValidChoiceCallbackClosure() + { + $constraint = new Choice(array('callback' => function () { + return array('foo', 'bar'); + })); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testValidChoiceCallbackStaticMethod() + { + $constraint = new Choice(array('callback' => array(__CLASS__, 'staticCallback'))); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testValidChoiceCallbackContextMethod() + { + // search $this for "staticCallback" + $this->setObject($this); + + $constraint = new Choice(array('callback' => 'staticCallback')); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testMultipleChoices() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar', 'baz'), + 'multiple' => true, + )); + + $this->validator->validate(array('baz', 'bar'), $constraint); + + $this->assertNoViolation(); + } + + public function testInvalidChoice() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar'), + 'message' => 'myMessage', + )); + + $this->validator->validate('baz', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"baz"') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } + + public function testInvalidChoiceEmptyChoices() + { + $constraint = new Choice(array( + // May happen when the choices are provided dynamically, e.g. from + // the DB or the model + 'choices' => array(), + 'message' => 'myMessage', + )); + + $this->validator->validate('baz', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"baz"') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } + + public function testInvalidChoiceMultiple() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar'), + 'multipleMessage' => 'myMessage', + 'multiple' => true, + )); + + $this->validator->validate(array('foo', 'baz'), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"baz"') + ->setInvalidValue('baz') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } + + public function testTooFewChoices() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar', 'moo', 'maa'), + 'multiple' => true, + 'min' => 2, + 'minMessage' => 'myMessage', + )); + + $value = array('foo'); + + $this->setValue($value); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ limit }}', 2) + ->setInvalidValue($value) + ->setPlural(2) + ->setCode(Choice::TOO_FEW_ERROR) + ->assertRaised(); + } + + public function testTooManyChoices() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar', 'moo', 'maa'), + 'multiple' => true, + 'max' => 2, + 'maxMessage' => 'myMessage', + )); + + $value = array('foo', 'bar', 'moo'); + + $this->setValue($value); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ limit }}', 2) + ->setInvalidValue($value) + ->setPlural(2) + ->setCode(Choice::TOO_MANY_ERROR) + ->assertRaised(); + } + + public function testNonStrict() + { + $constraint = new Choice(array( + 'choices' => array(1, 2), + 'strict' => false, + )); + + $this->validator->validate('2', $constraint); + $this->validator->validate(2, $constraint); + + $this->assertNoViolation(); + } + + public function testStrictAllowsExactValue() + { + $constraint = new Choice(array( + 'choices' => array(1, 2), + 'strict' => true, + )); + + $this->validator->validate(2, $constraint); + + $this->assertNoViolation(); + } + + public function testStrictDisallowsDifferentType() + { + $constraint = new Choice(array( + 'choices' => array(1, 2), + 'strict' => true, + 'message' => 'myMessage', + )); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"2"') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } + + public function testNonStrictWithMultipleChoices() + { + $constraint = new Choice(array( + 'choices' => array(1, 2, 3), + 'multiple' => true, + 'strict' => false, + )); + + $this->validator->validate(array('2', 3), $constraint); + + $this->assertNoViolation(); + } + + public function testStrictWithMultipleChoices() + { + $constraint = new Choice(array( + 'choices' => array(1, 2, 3), + 'multiple' => true, + 'strict' => true, + 'multipleMessage' => 'myMessage', + )); + + $this->validator->validate(array(2, '3'), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"3"') + ->setInvalidValue('3') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionTest.php new file mode 100644 index 0000000..b5fbf6c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionTest.php @@ -0,0 +1,113 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\Email; +use Symfony\Component\Validator\Constraints\Optional; +use Symfony\Component\Validator\Constraints\Required; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CollectionTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectInvalidFieldsOption() + { + new Collection(array( + 'fields' => 'foo', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectNonConstraints() + { + new Collection(array( + 'foo' => 'bar', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraint() + { + new Collection(array( + 'foo' => new Valid(), + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraintWithinOptional() + { + new Collection(array( + 'foo' => new Optional(new Valid()), + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraintWithinRequired() + { + new Collection(array( + 'foo' => new Required(new Valid()), + )); + } + + public function testAcceptOptionalConstraintAsOneElementArray() + { + $collection1 = new Collection(array( + 'fields' => array( + 'alternate_email' => array( + new Optional(new Email()), + ), + ), + )); + + $collection2 = new Collection(array( + 'fields' => array( + 'alternate_email' => new Optional(new Email()), + ), + )); + + $this->assertEquals($collection1, $collection2); + } + + public function testAcceptRequiredConstraintAsOneElementArray() + { + $collection1 = new Collection(array( + 'fields' => array( + 'alternate_email' => array( + new Required(new Email()), + ), + ), + )); + + $collection2 = new Collection(array( + 'fields' => array( + 'alternate_email' => new Required(new Email()), + ), + )); + + $this->assertEquals($collection1, $collection2); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php new file mode 100644 index 0000000..a3c4b33 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php @@ -0,0 +1,20 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +class CollectionValidatorArrayObjectTest extends CollectionValidatorTest +{ + public function prepareTestData(array $contents) + { + return new \ArrayObject($contents); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayTest.php new file mode 100644 index 0000000..7517d0c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayTest.php @@ -0,0 +1,20 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +class CollectionValidatorArrayTest extends CollectionValidatorTest +{ + public function prepareTestData(array $contents) + { + return $contents; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php new file mode 100644 index 0000000..3d4c296 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Tests\Fixtures\CustomArrayObject; + +class CollectionValidatorCustomArrayObjectTest extends CollectionValidatorTest +{ + public function prepareTestData(array $contents) + { + return new CustomArrayObject($contents); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorTest.php new file mode 100644 index 0000000..0376814 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorTest.php @@ -0,0 +1,389 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\CollectionValidator; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Optional; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\Required; +use Symfony\Component\Validator\Validation; + +abstract class CollectionValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new CollectionValidator(); + } + + abstract protected function prepareTestData(array $contents); + + public function testNullIsValid() + { + $this->validator->validate(null, new Collection(array('fields' => array( + 'foo' => new Range(array('min' => 4)), + )))); + + $this->assertNoViolation(); + } + + public function testFieldsAsDefaultOption() + { + $constraint = new Range(array('min' => 4)); + + $data = $this->prepareTestData(array('foo' => 'foobar')); + + $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + + $this->validator->validate($data, new Collection(array( + 'foo' => $constraint, + ))); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testThrowsExceptionIfNotTraversable() + { + $this->validator->validate('foobar', new Collection(array('fields' => array( + 'foo' => new Range(array('min' => 4)), + )))); + } + + public function testWalkSingleConstraint() + { + $constraint = new Range(array('min' => 4)); + + $array = array( + 'foo' => 3, + 'bar' => 5, + ); + + $i = 0; + + foreach ($array as $key => $value) { + $this->expectValidateValueAt($i++, '['.$key.']', $value, array($constraint)); + } + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + 'bar' => $constraint, + ), + ))); + + $this->assertNoViolation(); + } + + public function testWalkMultipleConstraints() + { + $constraints = array( + new Range(array('min' => 4)), + new NotNull(), + ); + + $array = array( + 'foo' => 3, + 'bar' => 5, + ); + + $i = 0; + + foreach ($array as $key => $value) { + $this->expectValidateValueAt($i++, '['.$key.']', $value, $constraints); + } + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraints, + 'bar' => $constraints, + ), + ))); + + $this->assertNoViolation(); + } + + public function testExtraFieldsDisallowed() + { + $constraint = new Range(array('min' => 4)); + + $data = $this->prepareTestData(array( + 'foo' => 5, + 'baz' => 6, + )); + + $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + 'extraFieldsMessage' => 'myMessage', + ))); + + $this->buildViolation('myMessage') + ->setParameter('{{ field }}', '"baz"') + ->atPath('property.path[baz]') + ->setInvalidValue(6) + ->setCode(Collection::NO_SUCH_FIELD_ERROR) + ->assertRaised(); + } + + // bug fix + public function testNullNotConsideredExtraField() + { + $data = $this->prepareTestData(array( + 'foo' => null, + )); + + $constraint = new Range(array('min' => 4)); + + $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + ))); + + $this->assertNoViolation(); + } + + public function testExtraFieldsAllowed() + { + $data = $this->prepareTestData(array( + 'foo' => 5, + 'bar' => 6, + )); + + $constraint = new Range(array('min' => 4)); + + $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + 'allowExtraFields' => true, + ))); + + $this->assertNoViolation(); + } + + public function testMissingFieldsDisallowed() + { + $data = $this->prepareTestData(array()); + + $constraint = new Range(array('min' => 4)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + 'missingFieldsMessage' => 'myMessage', + ))); + + $this->buildViolation('myMessage') + ->setParameter('{{ field }}', '"foo"') + ->atPath('property.path[foo]') + ->setInvalidValue(null) + ->setCode(Collection::MISSING_FIELD_ERROR) + ->assertRaised(); + } + + public function testMissingFieldsAllowed() + { + $data = $this->prepareTestData(array()); + + $constraint = new Range(array('min' => 4)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + 'allowMissingFields' => true, + ))); + + $this->assertNoViolation(); + } + + public function testOptionalFieldPresent() + { + $data = $this->prepareTestData(array( + 'foo' => null, + )); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Optional(), + ))); + + $this->assertNoViolation(); + } + + public function testOptionalFieldNotPresent() + { + $data = $this->prepareTestData(array()); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Optional(), + ))); + + $this->assertNoViolation(); + } + + public function testOptionalFieldSingleConstraint() + { + $array = array( + 'foo' => 5, + ); + + $constraint = new Range(array('min' => 4)); + + $this->expectValidateValueAt(0, '[foo]', $array['foo'], array($constraint)); + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Optional($constraint), + ))); + + $this->assertNoViolation(); + } + + public function testOptionalFieldMultipleConstraints() + { + $array = array( + 'foo' => 5, + ); + + $constraints = array( + new NotNull(), + new Range(array('min' => 4)), + ); + + $this->expectValidateValueAt(0, '[foo]', $array['foo'], $constraints); + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Optional($constraints), + ))); + + $this->assertNoViolation(); + } + + public function testRequiredFieldPresent() + { + $data = $this->prepareTestData(array( + 'foo' => null, + )); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Required(), + ))); + + $this->assertNoViolation(); + } + + public function testRequiredFieldNotPresent() + { + $data = $this->prepareTestData(array()); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => new Required(), + ), + 'missingFieldsMessage' => 'myMessage', + ))); + + $this->buildViolation('myMessage') + ->setParameter('{{ field }}', '"foo"') + ->atPath('property.path[foo]') + ->setInvalidValue(null) + ->setCode(Collection::MISSING_FIELD_ERROR) + ->assertRaised(); + } + + public function testRequiredFieldSingleConstraint() + { + $array = array( + 'foo' => 5, + ); + + $constraint = new Range(array('min' => 4)); + + $this->expectValidateValueAt(0, '[foo]', $array['foo'], array($constraint)); + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Required($constraint), + ))); + + $this->assertNoViolation(); + } + + public function testRequiredFieldMultipleConstraints() + { + $array = array( + 'foo' => 5, + ); + + $constraints = array( + new NotNull(), + new Range(array('min' => 4)), + ); + + $this->expectValidateValueAt(0, '[foo]', $array['foo'], $constraints); + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Required($constraints), + ))); + + $this->assertNoViolation(); + } + + public function testObjectShouldBeLeftUnchanged() + { + $value = new \ArrayObject(array( + 'foo' => 3, + )); + + $constraint = new Range(array('min' => 2)); + + $this->expectValidateValueAt(0, '[foo]', $value['foo'], array($constraint)); + + $this->validator->validate($value, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + ))); + + $this->assertEquals(array( + 'foo' => 3, + ), (array) $value); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CompositeTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CompositeTest.php new file mode 100644 index 0000000..df42550 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CompositeTest.php @@ -0,0 +1,148 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Composite; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Valid; + +class ConcreteComposite extends Composite +{ + public $constraints; + + protected function getCompositeOption() + { + return 'constraints'; + } + + public function getDefaultOption() + { + return 'constraints'; + } +} + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CompositeTest extends TestCase +{ + public function testMergeNestedGroupsIfNoExplicitParentGroup() + { + $constraint = new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + new NotBlank(array('groups' => array('Default', 'Strict'))), + )); + + $this->assertEquals(array('Default', 'Strict'), $constraint->groups); + $this->assertEquals(array('Default'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[1]->groups); + } + + public function testSetImplicitNestedGroupsIfExplicitParentGroup() + { + $constraint = new ConcreteComposite(array( + 'constraints' => array( + new NotNull(), + new NotBlank(), + ), + 'groups' => array('Default', 'Strict'), + )); + + $this->assertEquals(array('Default', 'Strict'), $constraint->groups); + $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[1]->groups); + } + + public function testExplicitNestedGroupsMustBeSubsetOfExplicitParentGroups() + { + $constraint = new ConcreteComposite(array( + 'constraints' => array( + new NotNull(array('groups' => 'Default')), + new NotBlank(array('groups' => 'Strict')), + ), + 'groups' => array('Default', 'Strict'), + )); + + $this->assertEquals(array('Default', 'Strict'), $constraint->groups); + $this->assertEquals(array('Default'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Strict'), $constraint->constraints[1]->groups); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testFailIfExplicitNestedGroupsNotSubsetOfExplicitParentGroups() + { + new ConcreteComposite(array( + 'constraints' => array( + new NotNull(array('groups' => array('Default', 'Foobar'))), + ), + 'groups' => array('Default', 'Strict'), + )); + } + + public function testImplicitGroupNamesAreForwarded() + { + $constraint = new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + new NotBlank(array('groups' => 'Strict')), + )); + + $constraint->addImplicitGroupName('ImplicitGroup'); + + $this->assertEquals(array('Default', 'Strict', 'ImplicitGroup'), $constraint->groups); + $this->assertEquals(array('Default', 'ImplicitGroup'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Strict'), $constraint->constraints[1]->groups); + } + + public function testSingleConstraintsAccepted() + { + $nestedConstraint = new NotNull(); + $constraint = new ConcreteComposite($nestedConstraint); + + $this->assertEquals(array($nestedConstraint), $constraint->constraints); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testFailIfNoConstraint() + { + new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + 'NotBlank', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testFailIfNoConstraintObject() + { + new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + new \ArrayObject(), + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testValidCantBeNested() + { + new ConcreteComposite(array( + new Valid(), + )); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorArrayTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorArrayTest.php new file mode 100644 index 0000000..5f562e7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorArrayTest.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CountValidatorArrayTest extends CountValidatorTest +{ + protected function createCollection(array $content) + { + return $content; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorCountableTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorCountableTest.php new file mode 100644 index 0000000..7d46967 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorCountableTest.php @@ -0,0 +1,25 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Tests\Fixtures\Countable; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CountValidatorCountableTest extends CountValidatorTest +{ + protected function createCollection(array $content) + { + return new Countable($content); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorTest.php new file mode 100644 index 0000000..5c89c85 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorTest.php @@ -0,0 +1,203 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Count; +use Symfony\Component\Validator\Constraints\CountValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class CountValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new CountValidator(); + } + + abstract protected function createCollection(array $content); + + public function testNullIsValid() + { + $this->validator->validate(null, new Count(6)); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsCountableType() + { + $this->validator->validate(new \stdClass(), new Count(5)); + } + + public function getThreeOrLessElements() + { + return array( + array($this->createCollection(array(1))), + array($this->createCollection(array(1, 2))), + array($this->createCollection(array(1, 2, 3))), + array($this->createCollection(array('a' => 1, 'b' => 2, 'c' => 3))), + ); + } + + public function getFourElements() + { + return array( + array($this->createCollection(array(1, 2, 3, 4))), + array($this->createCollection(array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4))), + ); + } + + public function getFiveOrMoreElements() + { + return array( + array($this->createCollection(array(1, 2, 3, 4, 5))), + array($this->createCollection(array(1, 2, 3, 4, 5, 6))), + array($this->createCollection(array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5))), + ); + } + + /** + * @dataProvider getThreeOrLessElements + */ + public function testValidValuesMax($value) + { + $constraint = new Count(array('max' => 3)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getFiveOrMoreElements + */ + public function testValidValuesMin($value) + { + $constraint = new Count(array('min' => 5)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getFourElements + */ + public function testValidValuesExact($value) + { + $constraint = new Count(4); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getFiveOrMoreElements + */ + public function testTooManyValues($value) + { + $constraint = new Count(array( + 'max' => 4, + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ count }}', \count($value)) + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Count::TOO_MANY_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getThreeOrLessElements + */ + public function testTooFewValues($value) + { + $constraint = new Count(array( + 'min' => 4, + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ count }}', \count($value)) + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Count::TOO_FEW_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getFiveOrMoreElements + */ + public function testTooManyValuesExact($value) + { + $constraint = new Count(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ count }}', \count($value)) + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Count::TOO_MANY_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getThreeOrLessElements + */ + public function testTooFewValuesExact($value) + { + $constraint = new Count(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ count }}', \count($value)) + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Count::TOO_FEW_ERROR) + ->assertRaised(); + } + + public function testDefaultOption() + { + $constraint = new Count(5); + + $this->assertEquals(5, $constraint->min); + $this->assertEquals(5, $constraint->max); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountryValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountryValidatorTest.php new file mode 100644 index 0000000..4baee3e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountryValidatorTest.php @@ -0,0 +1,110 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraints\Country; +use Symfony\Component\Validator\Constraints\CountryValidator; +use Symfony\Component\Validator\Validation; + +class CountryValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new CountryValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Country()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Country()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Country()); + } + + /** + * @dataProvider getValidCountries + */ + public function testValidCountries($country) + { + $this->validator->validate($country, new Country()); + + $this->assertNoViolation(); + } + + public function getValidCountries() + { + return array( + array('GB'), + array('AT'), + array('MY'), + ); + } + + /** + * @dataProvider getInvalidCountries + */ + public function testInvalidCountries($country) + { + $constraint = new Country(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($country, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$country.'"') + ->setCode(Country::NO_SUCH_COUNTRY_ERROR) + ->assertRaised(); + } + + public function getInvalidCountries() + { + return array( + array('foobar'), + array('EN'), + ); + } + + public function testValidateUsingCountrySpecificLocale() + { + // in order to test with "en_GB" + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('en_GB'); + + $existingCountry = 'GB'; + + $this->validator->validate($existingCountry, new Country()); + + $this->assertNoViolation(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CurrencyValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CurrencyValidatorTest.php new file mode 100644 index 0000000..1c11a6b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CurrencyValidatorTest.php @@ -0,0 +1,112 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraints\Currency; +use Symfony\Component\Validator\Constraints\CurrencyValidator; +use Symfony\Component\Validator\Validation; + +class CurrencyValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new CurrencyValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Currency()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Currency()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Currency()); + } + + /** + * @dataProvider getValidCurrencies + */ + public function testValidCurrencies($currency) + { + $this->validator->validate($currency, new Currency()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidCurrencies + **/ + public function testValidCurrenciesWithCountrySpecificLocale($currency) + { + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('en_GB'); + + $this->validator->validate($currency, new Currency()); + + $this->assertNoViolation(); + } + + public function getValidCurrencies() + { + return array( + array('EUR'), + array('USD'), + array('SIT'), + array('AUD'), + array('CAD'), + ); + } + + /** + * @dataProvider getInvalidCurrencies + */ + public function testInvalidCurrencies($currency) + { + $constraint = new Currency(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($currency, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$currency.'"') + ->setCode(Currency::NO_SUCH_CURRENCY_ERROR) + ->assertRaised(); + } + + public function getInvalidCurrencies() + { + return array( + array('EN'), + array('foobar'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateTimeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateTimeValidatorTest.php new file mode 100644 index 0000000..25d88aa --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateTimeValidatorTest.php @@ -0,0 +1,110 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\DateTime; +use Symfony\Component\Validator\Constraints\DateTimeValidator; +use Symfony\Component\Validator\Validation; + +class DateTimeValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new DateTimeValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new DateTime()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new DateTime()); + + $this->assertNoViolation(); + } + + public function testDateTimeClassIsValid() + { + $this->validator->validate(new \DateTime(), new DateTime()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new DateTime()); + } + + /** + * @dataProvider getValidDateTimes + */ + public function testValidDateTimes($dateTime) + { + $this->validator->validate($dateTime, new DateTime()); + + $this->assertNoViolation(); + } + + public function getValidDateTimes() + { + return array( + array('2010-01-01 01:02:03'), + array('1955-12-12 00:00:00'), + array('2030-05-31 23:59:59'), + ); + } + + /** + * @dataProvider getInvalidDateTimes + */ + public function testInvalidDateTimes($dateTime, $code) + { + $constraint = new DateTime(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($dateTime, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$dateTime.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidDateTimes() + { + return array( + array('foobar', DateTime::INVALID_FORMAT_ERROR), + array('2010-01-01', DateTime::INVALID_FORMAT_ERROR), + array('00:00:00', DateTime::INVALID_FORMAT_ERROR), + array('2010-01-01 00:00', DateTime::INVALID_FORMAT_ERROR), + array('2010-13-01 00:00:00', DateTime::INVALID_DATE_ERROR), + array('2010-04-32 00:00:00', DateTime::INVALID_DATE_ERROR), + array('2010-02-29 00:00:00', DateTime::INVALID_DATE_ERROR), + array('2010-01-01 24:00:00', DateTime::INVALID_TIME_ERROR), + array('2010-01-01 00:60:00', DateTime::INVALID_TIME_ERROR), + array('2010-01-01 00:00:60', DateTime::INVALID_TIME_ERROR), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateValidatorTest.php new file mode 100644 index 0000000..21f0a2d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateValidatorTest.php @@ -0,0 +1,106 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Date; +use Symfony\Component\Validator\Constraints\DateValidator; +use Symfony\Component\Validator\Validation; + +class DateValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new DateValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Date()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Date()); + + $this->assertNoViolation(); + } + + public function testDateTimeClassIsValid() + { + $this->validator->validate(new \DateTime(), new Date()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Date()); + } + + /** + * @dataProvider getValidDates + */ + public function testValidDates($date) + { + $this->validator->validate($date, new Date()); + + $this->assertNoViolation(); + } + + public function getValidDates() + { + return array( + array('2010-01-01'), + array('1955-12-12'), + array('2030-05-31'), + ); + } + + /** + * @dataProvider getInvalidDates + */ + public function testInvalidDates($date, $code) + { + $constraint = new Date(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($date, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$date.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidDates() + { + return array( + array('foobar', Date::INVALID_FORMAT_ERROR), + array('foobar 2010-13-01', Date::INVALID_FORMAT_ERROR), + array('2010-13-01 foobar', Date::INVALID_FORMAT_ERROR), + array('2010-13-01', Date::INVALID_DATE_ERROR), + array('2010-04-32', Date::INVALID_DATE_ERROR), + array('2010-02-29', Date::INVALID_DATE_ERROR), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php new file mode 100644 index 0000000..5933bd5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php @@ -0,0 +1,190 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Bridge\PhpUnit\DnsMock; +use Symfony\Component\Validator\Constraints\Email; +use Symfony\Component\Validator\Constraints\EmailValidator; +use Symfony\Component\Validator\Validation; + +/** + * @group dns-sensitive + */ +class EmailValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new EmailValidator(false); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Email()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Email()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Email()); + } + + /** + * @dataProvider getValidEmails + */ + public function testValidEmails($email) + { + $this->validator->validate($email, new Email()); + + $this->assertNoViolation(); + } + + public function getValidEmails() + { + return array( + array('fabien@symfony.com'), + array('example@example.co.uk'), + array('fabien_potencier@example.fr'), + ); + } + + /** + * @dataProvider getInvalidEmails + */ + public function testInvalidEmails($email) + { + $constraint = new Email(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($email, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$email.'"') + ->setCode(Email::INVALID_FORMAT_ERROR) + ->assertRaised(); + } + + public function getInvalidEmails() + { + return array( + array('example'), + array('example@'), + array('example@localhost'), + array('foo@example.com bar'), + ); + } + + public function testStrict() + { + $constraint = new Email(array('strict' => true)); + + $this->validator->validate('example@localhost', $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getDnsChecks + * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts + */ + public function testDnsChecks($type, $violation) + { + DnsMock::withMockedHosts(array('example.com' => array(array('type' => $violation ? false : $type)))); + + $constraint = new Email(array( + 'message' => 'myMessage', + 'MX' === $type ? 'checkMX' : 'checkHost' => true, + )); + + $this->validator->validate('foo@example.com', $constraint); + + if (!$violation) { + $this->assertNoViolation(); + } else { + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"foo@example.com"') + ->setCode($violation) + ->assertRaised(); + } + } + + public function getDnsChecks() + { + return array( + array('MX', false), + array('MX', Email::MX_CHECK_FAILED_ERROR), + array('A', false), + array('A', Email::HOST_CHECK_FAILED_ERROR), + array('AAAA', false), + array('AAAA', Email::HOST_CHECK_FAILED_ERROR), + ); + } + + /** + * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts + */ + public function testHostnameIsProperlyParsed() + { + DnsMock::withMockedHosts(array('baz.com' => array(array('type' => 'MX')))); + + $this->validator->validate( + '"foo@bar"@baz.com', + new Email(array('checkMX' => true)) + ); + + $this->assertNoViolation(); + } + + /** + * @dataProvider provideCheckTypes + */ + public function testEmptyHostIsNotValid($checkType, $violation) + { + $this->validator->validate( + 'foo@bar.fr@', + new Email(array( + 'message' => 'myMessage', + $checkType => true, + )) + ); + + $this + ->buildViolation('myMessage') + ->setParameter('{{ value }}', '"foo@bar.fr@"') + ->setCode($violation) + ->assertRaised(); + } + + public function provideCheckTypes() + { + return array( + array('checkMX', Email::MX_CHECK_FAILED_ERROR), + array('checkHost', Email::HOST_CHECK_FAILED_ERROR), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/EqualToValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/EqualToValidatorTest.php new file mode 100644 index 0000000..32c81c3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/EqualToValidatorTest.php @@ -0,0 +1,74 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\EqualTo; +use Symfony\Component\Validator\Constraints\EqualToValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Daniel Holmes <daniel@danielholmes.org> + */ +class EqualToValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new EqualToValidator(); + } + + protected function createConstraint(array $options = null) + { + return new EqualTo($options); + } + + protected function getErrorCode() + { + return EqualTo::NOT_EQUAL_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(3, 3), + array(3, '3'), + array('a', 'a'), + array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2000-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), + array(new ComparisonTest_Class(5), new ComparisonTest_Class(5)), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array('22', '"22"', '333', '"333"', 'string'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2001-01-01 UTC'), 'Jan 1, 2001, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php new file mode 100644 index 0000000..ee287c9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php @@ -0,0 +1,279 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Component\Validator\Constraints\Expression; +use Symfony\Component\Validator\Constraints\ExpressionValidator; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Tests\Fixtures\ToString; +use Symfony\Component\Validator\Validation; + +class ExpressionValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new ExpressionValidator(PropertyAccess::createPropertyAccessor()); + } + + public function testExpressionIsEvaluatedWithNullValue() + { + $constraint = new Expression(array( + 'expression' => 'false', + 'message' => 'myMessage', + )); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'null') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testExpressionIsEvaluatedWithEmptyStringValue() + { + $constraint = new Expression(array( + 'expression' => 'false', + 'message' => 'myMessage', + )); + + $this->validator->validate('', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '""') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtObjectLevel() + { + $constraint = new Expression('this.data == 1'); + + $object = new Entity(); + $object->data = '1'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtObjectLevel() + { + $constraint = new Expression(array( + 'expression' => 'this.data == 1', + 'message' => 'myMessage', + )); + + $object = new Entity(); + $object->data = '2'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'object') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtObjectLevelWithToString() + { + $constraint = new Expression('this.data == 1'); + + $object = new ToString(); + $object->data = '1'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtObjectLevelWithToString() + { + $constraint = new Expression(array( + 'expression' => 'this.data == 1', + 'message' => 'myMessage', + )); + + $object = new ToString(); + $object->data = '2'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'toString') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtPropertyLevel() + { + $constraint = new Expression('value == this.data'); + + $object = new Entity(); + $object->data = '1'; + + $this->setRoot($object); + $this->setPropertyPath('data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('1', $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtPropertyLevel() + { + $constraint = new Expression(array( + 'expression' => 'value == this.data', + 'message' => 'myMessage', + )); + + $object = new Entity(); + $object->data = '1'; + + $this->setRoot($object); + $this->setPropertyPath('data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->atPath('data') + ->setParameter('{{ value }}', '"2"') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtNestedPropertyLevel() + { + $constraint = new Expression('value == this.data'); + + $object = new Entity(); + $object->data = '1'; + + $root = new Entity(); + $root->reference = $object; + + $this->setRoot($root); + $this->setPropertyPath('reference.data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('1', $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtNestedPropertyLevel() + { + $constraint = new Expression(array( + 'expression' => 'value == this.data', + 'message' => 'myMessage', + )); + + $object = new Entity(); + $object->data = '1'; + + $root = new Entity(); + $root->reference = $object; + + $this->setRoot($root); + $this->setPropertyPath('reference.data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->atPath('reference.data') + ->setParameter('{{ value }}', '"2"') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + /** + * When validatePropertyValue() is called with a class name + * https://github.com/symfony/symfony/pull/11498. + */ + public function testSucceedingExpressionAtPropertyLevelWithoutRoot() + { + $constraint = new Expression('value == "1"'); + + $this->setRoot('1'); + $this->setPropertyPath(''); + $this->setProperty(null, 'property'); + + $this->validator->validate('1', $constraint); + + $this->assertNoViolation(); + } + + /** + * When validatePropertyValue() is called with a class name + * https://github.com/symfony/symfony/pull/11498. + */ + public function testFailingExpressionAtPropertyLevelWithoutRoot() + { + $constraint = new Expression(array( + 'expression' => 'value == "1"', + 'message' => 'myMessage', + )); + + $this->setRoot('2'); + $this->setPropertyPath(''); + $this->setProperty(null, 'property'); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->atPath('') + ->setParameter('{{ value }}', '"2"') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testExpressionLanguageUsage() + { + $constraint = new Expression(array( + 'expression' => 'false', + )); + + $expressionLanguage = $this->getMockBuilder('Symfony\Component\ExpressionLanguage\ExpressionLanguage')->getMock(); + + $used = false; + + $expressionLanguage->method('evaluate') + ->will($this->returnCallback(function () use (&$used) { + $used = true; + + return true; + })); + + $validator = new ExpressionValidator(null, $expressionLanguage); + $validator->initialize($this->createContext()); + $validator->validate(null, $constraint); + + $this->assertTrue($used, 'Failed asserting that custom ExpressionLanguage instance is used.'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileTest.php new file mode 100644 index 0000000..b7745f4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileTest.php @@ -0,0 +1,139 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\File; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +class FileTest extends TestCase +{ + /** + * @dataProvider provideValidSizes + */ + public function testMaxSize($maxSize, $bytes, $binaryFormat) + { + $file = new File(array('maxSize' => $maxSize)); + + $this->assertSame($bytes, $file->maxSize); + $this->assertSame($binaryFormat, $file->binaryFormat); + $this->assertTrue($file->__isset('maxSize')); + } + + public function testMagicIsset() + { + $file = new File(array('maxSize' => 1)); + + $this->assertTrue($file->__isset('maxSize')); + $this->assertTrue($file->__isset('groups')); + $this->assertFalse($file->__isset('toto')); + } + + /** + * @dataProvider provideValidSizes + */ + public function testMaxSizeCanBeSetAfterInitialization($maxSize, $bytes, $binaryFormat) + { + $file = new File(); + $file->maxSize = $maxSize; + + $this->assertSame($bytes, $file->maxSize); + $this->assertSame($binaryFormat, $file->binaryFormat); + } + + /** + * @dataProvider provideInvalidSizes + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidValueForMaxSizeThrowsExceptionAfterInitialization($maxSize) + { + $file = new File(array('maxSize' => 1000)); + $file->maxSize = $maxSize; + } + + /** + * @dataProvider provideInvalidSizes + */ + public function testMaxSizeCannotBeSetToInvalidValueAfterInitialization($maxSize) + { + $file = new File(array('maxSize' => 1000)); + + try { + $file->maxSize = $maxSize; + } catch (ConstraintDefinitionException $e) { + } + + $this->assertSame(1000, $file->maxSize); + } + + /** + * @dataProvider provideInValidSizes + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxSize($maxSize) + { + new File(array('maxSize' => $maxSize)); + } + + public function provideValidSizes() + { + return array( + array('500', 500, false), + array(12300, 12300, false), + array('1ki', 1024, true), + array('1KI', 1024, true), + array('2k', 2000, false), + array('2K', 2000, false), + array('1mi', 1048576, true), + array('1MI', 1048576, true), + array('3m', 3000000, false), + array('3M', 3000000, false), + ); + } + + public function provideInvalidSizes() + { + return array( + array('+100'), + array('foo'), + array('1Ko'), + array('1kio'), + array('1G'), + array('1Gi'), + ); + } + + /** + * @dataProvider provideFormats + */ + public function testBinaryFormat($maxSize, $guessedFormat, $binaryFormat) + { + $file = new File(array('maxSize' => $maxSize, 'binaryFormat' => $guessedFormat)); + + $this->assertSame($binaryFormat, $file->binaryFormat); + } + + public function provideFormats() + { + return array( + array(100, null, false), + array(100, true, true), + array(100, false, false), + array('100K', null, false), + array('100K', true, true), + array('100K', false, false), + array('100Ki', null, true), + array('100Ki', true, true), + array('100Ki', false, false), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorObjectTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorObjectTest.php new file mode 100644 index 0000000..f35f93b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorObjectTest.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\HttpFoundation\File\File; + +class FileValidatorObjectTest extends FileValidatorTest +{ + protected function getFile($filename) + { + return new File($filename); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorPathTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorPathTest.php new file mode 100644 index 0000000..11b8d4c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorPathTest.php @@ -0,0 +1,36 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\File; + +class FileValidatorPathTest extends FileValidatorTest +{ + protected function getFile($filename) + { + return $filename; + } + + public function testFileNotFound() + { + $constraint = new File(array( + 'notFoundMessage' => 'myMessage', + )); + + $this->validator->validate('foobar', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ file }}', '"foobar"') + ->setCode(File::NOT_FOUND_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php new file mode 100644 index 0000000..6e2199c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php @@ -0,0 +1,483 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\Validator\Constraints\File; +use Symfony\Component\Validator\Constraints\FileValidator; +use Symfony\Component\Validator\Validation; + +abstract class FileValidatorTest extends AbstractConstraintValidatorTest +{ + protected $path; + + protected $file; + + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new FileValidator(); + } + + protected function setUp() + { + parent::setUp(); + + $this->path = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'FileValidatorTest'; + $this->file = fopen($this->path, 'w'); + fwrite($this->file, ' ', 1); + } + + protected function tearDown() + { + parent::tearDown(); + + if (\is_resource($this->file)) { + fclose($this->file); + } + + if (file_exists($this->path)) { + unlink($this->path); + } + + $this->path = null; + $this->file = null; + } + + public function testNullIsValid() + { + $this->validator->validate(null, new File()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new File()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleTypeOrFile() + { + $this->validator->validate(new \stdClass(), new File()); + } + + public function testValidFile() + { + $this->validator->validate($this->path, new File()); + + $this->assertNoViolation(); + } + + public function testValidUploadedfile() + { + $file = new UploadedFile($this->path, 'originalName', null, null, null, true); + $this->validator->validate($file, new File()); + + $this->assertNoViolation(); + } + + public function provideMaxSizeExceededTests() + { + // We have various interesting limit - size combinations to test. + // Assume a limit of 1000 bytes (1 kB). Then the following table + // lists the violation messages for different file sizes: + // -----------+-------------------------------------------------------- + // Size | Violation Message + // -----------+-------------------------------------------------------- + // 1000 bytes | No violation + // 1001 bytes | "Size of 1001 bytes exceeded limit of 1000 bytes" + // 1004 bytes | "Size of 1004 bytes exceeded limit of 1000 bytes" + // | NOT: "Size of 1 kB exceeded limit of 1 kB" + // 1005 bytes | "Size of 1.01 kB exceeded limit of 1 kB" + // -----------+-------------------------------------------------------- + + // As you see, we have two interesting borders: + + // 1000/1001 - The border as of which a violation occurs + // 1004/1005 - The border as of which the message can be rounded to kB + + // Analogous for kB/MB. + + // Prior to Symfony 2.5, violation messages are always displayed in the + // same unit used to specify the limit. + + // As of Symfony 2.5, the above logic is implemented. + return array( + // limit in bytes + array(1001, 1000, '1001', '1000', 'bytes'), + array(1004, 1000, '1004', '1000', 'bytes'), + array(1005, 1000, '1.01', '1', 'kB'), + + array(1000001, 1000000, '1000001', '1000000', 'bytes'), + array(1004999, 1000000, '1005', '1000', 'kB'), + array(1005000, 1000000, '1.01', '1', 'MB'), + + // limit in kB + array(1001, '1k', '1001', '1000', 'bytes'), + array(1004, '1k', '1004', '1000', 'bytes'), + array(1005, '1k', '1.01', '1', 'kB'), + + array(1000001, '1000k', '1000001', '1000000', 'bytes'), + array(1004999, '1000k', '1005', '1000', 'kB'), + array(1005000, '1000k', '1.01', '1', 'MB'), + + // limit in MB + array(1000001, '1M', '1000001', '1000000', 'bytes'), + array(1004999, '1M', '1005', '1000', 'kB'), + array(1005000, '1M', '1.01', '1', 'MB'), + + // limit in KiB + array(1025, '1Ki', '1025', '1024', 'bytes'), + array(1029, '1Ki', '1029', '1024', 'bytes'), + array(1030, '1Ki', '1.01', '1', 'KiB'), + + array(1048577, '1024Ki', '1048577', '1048576', 'bytes'), + array(1053818, '1024Ki', '1029.12', '1024', 'KiB'), + array(1053819, '1024Ki', '1.01', '1', 'MiB'), + + // limit in MiB + array(1048577, '1Mi', '1048577', '1048576', 'bytes'), + array(1053818, '1Mi', '1029.12', '1024', 'KiB'), + array(1053819, '1Mi', '1.01', '1', 'MiB'), + ); + } + + /** + * @dataProvider provideMaxSizeExceededTests + */ + public function testMaxSizeExceeded($bytesWritten, $limit, $sizeAsString, $limitAsString, $suffix) + { + fseek($this->file, $bytesWritten - 1, SEEK_SET); + fwrite($this->file, '0'); + fclose($this->file); + + $constraint = new File(array( + 'maxSize' => $limit, + 'maxSizeMessage' => 'myMessage', + )); + + $this->validator->validate($this->getFile($this->path), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ size }}', $sizeAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::TOO_LARGE_ERROR) + ->assertRaised(); + } + + public function provideMaxSizeNotExceededTests() + { + return array( + // limit in bytes + array(1000, 1000), + array(1000000, 1000000), + + // limit in kB + array(1000, '1k'), + array(1000000, '1000k'), + + // limit in MB + array(1000000, '1M'), + + // limit in KiB + array(1024, '1Ki'), + array(1048576, '1024Ki'), + + // limit in MiB + array(1048576, '1Mi'), + ); + } + + /** + * @dataProvider provideMaxSizeNotExceededTests + */ + public function testMaxSizeNotExceeded($bytesWritten, $limit) + { + fseek($this->file, $bytesWritten - 1, SEEK_SET); + fwrite($this->file, '0'); + fclose($this->file); + + $constraint = new File(array( + 'maxSize' => $limit, + 'maxSizeMessage' => 'myMessage', + )); + + $this->validator->validate($this->getFile($this->path), $constraint); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxSize() + { + $constraint = new File(array( + 'maxSize' => '1abc', + )); + + $this->validator->validate($this->path, $constraint); + } + + public function provideBinaryFormatTests() + { + return array( + array(11, 10, null, '11', '10', 'bytes'), + array(11, 10, true, '11', '10', 'bytes'), + array(11, 10, false, '11', '10', 'bytes'), + + // round(size) == 1.01kB, limit == 1kB + array(ceil(1000 * 1.01), 1000, null, '1.01', '1', 'kB'), + array(ceil(1000 * 1.01), '1k', null, '1.01', '1', 'kB'), + array(ceil(1024 * 1.01), '1Ki', null, '1.01', '1', 'KiB'), + + array(ceil(1024 * 1.01), 1024, true, '1.01', '1', 'KiB'), + array(ceil(1024 * 1.01 * 1000), '1024k', true, '1010', '1000', 'KiB'), + array(ceil(1024 * 1.01), '1Ki', true, '1.01', '1', 'KiB'), + + array(ceil(1000 * 1.01), 1000, false, '1.01', '1', 'kB'), + array(ceil(1000 * 1.01), '1k', false, '1.01', '1', 'kB'), + array(ceil(1024 * 1.01 * 10), '10Ki', false, '10.34', '10.24', 'kB'), + ); + } + + /** + * @dataProvider provideBinaryFormatTests + */ + public function testBinaryFormat($bytesWritten, $limit, $binaryFormat, $sizeAsString, $limitAsString, $suffix) + { + fseek($this->file, $bytesWritten - 1, SEEK_SET); + fwrite($this->file, '0'); + fclose($this->file); + + $constraint = new File(array( + 'maxSize' => $limit, + 'binaryFormat' => $binaryFormat, + 'maxSizeMessage' => 'myMessage', + )); + + $this->validator->validate($this->getFile($this->path), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ size }}', $sizeAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::TOO_LARGE_ERROR) + ->assertRaised(); + } + + public function testValidMimeType() + { + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') + ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->getMock(); + $file + ->expects($this->once()) + ->method('getPathname') + ->will($this->returnValue($this->path)); + $file + ->expects($this->once()) + ->method('getMimeType') + ->will($this->returnValue('image/jpg')); + + $constraint = new File(array( + 'mimeTypes' => array('image/png', 'image/jpg'), + )); + + $this->validator->validate($file, $constraint); + + $this->assertNoViolation(); + } + + public function testValidWildcardMimeType() + { + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') + ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->getMock(); + $file + ->expects($this->once()) + ->method('getPathname') + ->will($this->returnValue($this->path)); + $file + ->expects($this->once()) + ->method('getMimeType') + ->will($this->returnValue('image/jpg')); + + $constraint = new File(array( + 'mimeTypes' => array('image/*'), + )); + + $this->validator->validate($file, $constraint); + + $this->assertNoViolation(); + } + + public function testInvalidMimeType() + { + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') + ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->getMock(); + $file + ->expects($this->once()) + ->method('getPathname') + ->will($this->returnValue($this->path)); + $file + ->expects($this->once()) + ->method('getMimeType') + ->will($this->returnValue('application/pdf')); + + $constraint = new File(array( + 'mimeTypes' => array('image/png', 'image/jpg'), + 'mimeTypesMessage' => 'myMessage', + )); + + $this->validator->validate($file, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ type }}', '"application/pdf"') + ->setParameter('{{ types }}', '"image/png", "image/jpg"') + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::INVALID_MIME_TYPE_ERROR) + ->assertRaised(); + } + + public function testInvalidWildcardMimeType() + { + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') + ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->getMock(); + $file + ->expects($this->once()) + ->method('getPathname') + ->will($this->returnValue($this->path)); + $file + ->expects($this->once()) + ->method('getMimeType') + ->will($this->returnValue('application/pdf')); + + $constraint = new File(array( + 'mimeTypes' => array('image/*', 'image/jpg'), + 'mimeTypesMessage' => 'myMessage', + )); + + $this->validator->validate($file, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ type }}', '"application/pdf"') + ->setParameter('{{ types }}', '"image/*", "image/jpg"') + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::INVALID_MIME_TYPE_ERROR) + ->assertRaised(); + } + + public function testDisallowEmpty() + { + ftruncate($this->file, 0); + + $constraint = new File(array( + 'disallowEmptyMessage' => 'myMessage', + )); + + $this->validator->validate($this->getFile($this->path), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::EMPTY_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider uploadedFileErrorProvider + */ + public function testUploadedFileError($error, $message, array $params = array(), $maxSize = null) + { + $file = new UploadedFile('/path/to/file', 'originalName', 'mime', 0, $error); + + $constraint = new File(array( + $message => 'myMessage', + 'maxSize' => $maxSize, + )); + + $this->validator->validate($file, $constraint); + + $this->buildViolation('myMessage') + ->setParameters($params) + ->setCode($error) + ->assertRaised(); + } + + public function uploadedFileErrorProvider() + { + $tests = array( + array(UPLOAD_ERR_FORM_SIZE, 'uploadFormSizeErrorMessage'), + array(UPLOAD_ERR_PARTIAL, 'uploadPartialErrorMessage'), + array(UPLOAD_ERR_NO_FILE, 'uploadNoFileErrorMessage'), + array(UPLOAD_ERR_NO_TMP_DIR, 'uploadNoTmpDirErrorMessage'), + array(UPLOAD_ERR_CANT_WRITE, 'uploadCantWriteErrorMessage'), + array(UPLOAD_ERR_EXTENSION, 'uploadExtensionErrorMessage'), + ); + + if (class_exists('Symfony\Component\HttpFoundation\File\UploadedFile')) { + // when no maxSize is specified on constraint, it should use the ini value + $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + '{{ limit }}' => UploadedFile::getMaxFilesize() / 1048576, + '{{ suffix }}' => 'MiB', + )); + + // it should use the smaller limitation (maxSize option in this case) + $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + '{{ limit }}' => 1, + '{{ suffix }}' => 'bytes', + ), '1'); + + // access FileValidator::factorizeSizes() private method to format max file size + $reflection = new \ReflectionClass(\get_class(new FileValidator())); + $method = $reflection->getMethod('factorizeSizes'); + $method->setAccessible(true); + list($sizeAsString, $limit, $suffix) = $method->invokeArgs(new FileValidator(), array(0, UploadedFile::getMaxFilesize(), false)); + + // it correctly parses the maxSize option and not only uses simple string comparison + // 1000M should be bigger than the ini value + $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + '{{ limit }}' => $limit, + '{{ suffix }}' => $suffix, + ), '1000M'); + + // it correctly parses the maxSize option and not only uses simple string comparison + // 1000M should be bigger than the ini value + $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + '{{ limit }}' => '0.1', + '{{ suffix }}' => 'MB', + ), '100K'); + } + + return $tests; + } + + abstract protected function getFile($filename); +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/foo b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/foo new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/foo diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test.gif b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test.gif Binary files differnew file mode 100644 index 0000000..6b44fc7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test.gif diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_4by3.gif b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_4by3.gif Binary files differnew file mode 100644 index 0000000..64dd3ff --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_4by3.gif diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_landscape.gif b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_landscape.gif Binary files differnew file mode 100644 index 0000000..8701235 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_landscape.gif diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_portrait.gif b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_portrait.gif Binary files differnew file mode 100644 index 0000000..cc480ca --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_portrait.gif diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php new file mode 100644 index 0000000..2a8bcb3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php @@ -0,0 +1,76 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\GreaterThanOrEqual; +use Symfony\Component\Validator\Constraints\GreaterThanOrEqualValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Daniel Holmes <daniel@danielholmes.org> + */ +class GreaterThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new GreaterThanOrEqualValidator(); + } + + protected function createConstraint(array $options = null) + { + return new GreaterThanOrEqual($options); + } + + protected function getErrorCode() + { + return GreaterThanOrEqual::TOO_LOW_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(3, 2), + array(1, 1), + array(new \DateTime('2010/01/01'), new \DateTime('2000/01/01')), + array(new \DateTime('2000/01/01'), new \DateTime('2000/01/01')), + array(new \DateTime('2010/01/01'), '2000/01/01'), + array(new \DateTime('2000/01/01'), '2000/01/01'), + array(new \DateTime('2010/01/01 UTC'), '2000/01/01 UTC'), + array(new \DateTime('2000/01/01 UTC'), '2000/01/01 UTC'), + array('a', 'a'), + array('z', 'a'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array('b', '"b"', 'c', '"c"', 'string'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanValidatorTest.php new file mode 100644 index 0000000..8e763fb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanValidatorTest.php @@ -0,0 +1,79 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\GreaterThan; +use Symfony\Component\Validator\Constraints\GreaterThanValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Daniel Holmes <daniel@danielholmes.org> + */ +class GreaterThanValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new GreaterThanValidator(); + } + + protected function createConstraint(array $options = null) + { + return new GreaterThan($options); + } + + protected function getErrorCode() + { + return GreaterThan::TOO_LOW_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(2, 1), + array(new \DateTime('2005/01/01'), new \DateTime('2001/01/01')), + array(new \DateTime('2005/01/01'), '2001/01/01'), + array(new \DateTime('2005/01/01 UTC'), '2001/01/01 UTC'), + array(new ComparisonTest_Class(5), new ComparisonTest_Class(4)), + array('333', '22'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array(2, '2', 2, '2', 'integer'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2000/01/01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000/01/01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array('22', '"22"', '333', '"333"', 'string'), + array('22', '"22"', '22', '"22"', 'string'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/GroupSequenceTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GroupSequenceTest.php new file mode 100644 index 0000000..2b906a9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GroupSequenceTest.php @@ -0,0 +1,100 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\GroupSequence; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class GroupSequenceTest extends TestCase +{ + public function testCreate() + { + $sequence = new GroupSequence(array('Group 1', 'Group 2')); + + $this->assertSame(array('Group 1', 'Group 2'), $sequence->groups); + } + + public function testCreateDoctrineStyle() + { + $sequence = new GroupSequence(array('value' => array('Group 1', 'Group 2'))); + + $this->assertSame(array('Group 1', 'Group 2'), $sequence->groups); + } + + /** + * @group legacy + */ + public function testLegacyIterate() + { + $sequence = new GroupSequence(array('Group 1', 'Group 2')); + + $this->assertSame(array('Group 1', 'Group 2'), iterator_to_array($sequence)); + } + + /** + * @group legacy + */ + public function testLegacyCount() + { + $sequence = new GroupSequence(array('Group 1', 'Group 2')); + + $this->assertCount(2, $sequence); + } + + /** + * @group legacy + */ + public function testLegacyArrayAccess() + { + $sequence = new GroupSequence(array('Group 1', 'Group 2')); + + $this->assertSame('Group 1', $sequence[0]); + $this->assertSame('Group 2', $sequence[1]); + $this->assertArrayHasKey(0, $sequence); + $this->assertArrayNotHasKey(2, $sequence); + unset($sequence[0]); + $this->assertArrayNotHasKey(0, $sequence); + $sequence[] = 'Group 3'; + $this->assertArrayHasKey(2, $sequence); + $this->assertSame('Group 3', $sequence[2]); + $sequence[0] = 'Group 1'; + $this->assertArrayHasKey(0, $sequence); + $this->assertSame('Group 1', $sequence[0]); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\OutOfBoundsException + * @group legacy + */ + public function testLegacyGetExpectsExistingKey() + { + $sequence = new GroupSequence(array('Group 1', 'Group 2')); + + $sequence[2]; + } + + /** + * @group legacy + */ + public function testLegacyUnsetIgnoresNonExistingKeys() + { + $sequence = new GroupSequence(array('Group 1', 'Group 2')); + + // should not fail + unset($sequence[2]); + + $this->assertCount(2, $sequence); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php new file mode 100644 index 0000000..16bf834 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php @@ -0,0 +1,450 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Iban; +use Symfony\Component\Validator\Constraints\IbanValidator; +use Symfony\Component\Validator\Validation; + +class IbanValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new IbanValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Iban()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Iban()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidIbans + */ + public function testValidIbans($iban) + { + $this->validator->validate($iban, new Iban()); + + $this->assertNoViolation(); + } + + public function getValidIbans() + { + return array( + array('CH9300762011623852957'), // Switzerland without spaces + array('CH93 0076 2011 6238 5295 7'), // Switzerland with multiple spaces + + // Country list + // http://www.rbs.co.uk/corporate/international/g0/guide-to-international-business/regulatory-information/iban/iban-example.ashx + + array('AL47 2121 1009 0000 0002 3569 8741'), //Albania + array('AD12 0001 2030 2003 5910 0100'), //Andorra + array('AT61 1904 3002 3457 3201'), //Austria + array('AZ21 NABZ 0000 0000 1370 1000 1944'), //Azerbaijan + array('BH67 BMAG 0000 1299 1234 56'), //Bahrain + array('BE62 5100 0754 7061'), //Belgium + array('BA39 1290 0794 0102 8494'), //Bosnia and Herzegovina + array('BG80 BNBG 9661 1020 3456 78'), //Bulgaria + array('BY 13 NBRB 3600 900000002Z00AB00'), //Belarus + array('BY13 NBRB 3600 900000002Z00AB00'), //Belarus + array('BY22NB23324232T78YR7823HR32U'), //Belarus + array('HR12 1001 0051 8630 0016 0'), //Croatia + array('CY17 0020 0128 0000 0012 0052 7600'), //Cyprus + array('CZ65 0800 0000 1920 0014 5399'), //Czech Republic + array('DK50 0040 0440 1162 43'), //Denmark + array('EE38 2200 2210 2014 5685'), //Estonia + array('FO97 5432 0388 8999 44'), //Faroe Islands + array('FI21 1234 5600 0007 85'), //Finland + array('FR14 2004 1010 0505 0001 3M02 606'), //France + array('GE29 NB00 0000 0101 9049 17'), //Georgia + array('DE89 3704 0044 0532 0130 00'), //Germany + array('GI75 NWBK 0000 0000 7099 453'), //Gibraltar + array('GR16 0110 1250 0000 0001 2300 695'), //Greece + array('GL56 0444 9876 5432 10'), //Greenland + array('HU42 1177 3016 1111 1018 0000 0000'), //Hungary + array('IS14 0159 2600 7654 5510 7303 39'), //Iceland + array('IE29 AIBK 9311 5212 3456 78'), //Ireland + array('IL62 0108 0000 0009 9999 999'), //Israel + array('IT40 S054 2811 1010 0000 0123 456'), //Italy + array('LV80 BANK 0000 4351 9500 1'), //Latvia + array('LB62 0999 0000 0001 0019 0122 9114'), //Lebanon + array('LI21 0881 0000 2324 013A A'), //Liechtenstein + array('LT12 1000 0111 0100 1000'), //Lithuania + array('LU28 0019 4006 4475 0000'), //Luxembourg + array('MK072 5012 0000 0589 84'), //Macedonia + array('MT84 MALT 0110 0001 2345 MTLC AST0 01S'), //Malta + array('MU17 BOMM 0101 1010 3030 0200 000M UR'), //Mauritius + array('MD24 AG00 0225 1000 1310 4168'), //Moldova + array('MC93 2005 2222 1001 1223 3M44 555'), //Monaco + array('ME25 5050 0001 2345 6789 51'), //Montenegro + array('NL39 RABO 0300 0652 64'), //Netherlands + array('NO93 8601 1117 947'), //Norway + array('PK36 SCBL 0000 0011 2345 6702'), //Pakistan + array('PL60 1020 1026 0000 0422 7020 1111'), //Poland + array('PT50 0002 0123 1234 5678 9015 4'), //Portugal + array('RO49 AAAA 1B31 0075 9384 0000'), //Romania + array('SM86 U032 2509 8000 0000 0270 100'), //San Marino + array('SA03 8000 0000 6080 1016 7519'), //Saudi Arabia + array('RS35 2600 0560 1001 6113 79'), //Serbia + array('SK31 1200 0000 1987 4263 7541'), //Slovak Republic + array('SI56 1910 0000 0123 438'), //Slovenia + array('ES80 2310 0001 1800 0001 2345'), //Spain + array('SE35 5000 0000 0549 1000 0003'), //Sweden + array('CH93 0076 2011 6238 5295 7'), //Switzerland + array('TN59 1000 6035 1835 9847 8831'), //Tunisia + array('TR33 0006 1005 1978 6457 8413 26'), //Turkey + array('AE07 0331 2345 6789 0123 456'), //UAE + array('GB12 CPBK 0892 9965 0449 91'), //United Kingdom + + //Extended country list + //http://www.nordea.com/Our+services/International+products+and+services/Cash+Management/IBAN+countries/908462.html + // https://www.swift.com/sites/default/files/resources/iban_registry.pdf + array('AO06000600000100037131174'), //Angola + array('AZ21NABZ00000000137010001944'), //Azerbaijan + array('BH29BMAG1299123456BH00'), //Bahrain + array('BJ11B00610100400271101192591'), //Benin + array('BR9700360305000010009795493P1'), // Brazil + array('BR1800000000141455123924100C2'), // Brazil + array('VG96VPVG0000012345678901'), //British Virgin Islands + array('BF1030134020015400945000643'), //Burkina Faso + array('BI43201011067444'), //Burundi + array('CM2110003001000500000605306'), //Cameroon + array('CV64000300004547069110176'), //Cape Verde + array('FR7630007000110009970004942'), //Central African Republic + array('CG5230011000202151234567890'), //Congo + array('CR05015202001026284066'), //Costa Rica + array('DO28BAGR00000001212453611324'), //Dominican Republic + array('GT82TRAJ01020000001210029690'), //Guatemala + array('IR580540105180021273113007'), //Iran + array('IL620108000000099999999'), //Israel + array('CI05A00060174100178530011852'), //Ivory Coast + array('JO94CBJO0010000000000131000302'), // Jordan + array('KZ176010251000042993'), //Kazakhstan + array('KW74NBOK0000000000001000372151'), //Kuwait + array('LB30099900000001001925579115'), //Lebanon + array('MG4600005030010101914016056'), //Madagascar + array('ML03D00890170001002120000447'), //Mali + array('MR1300012000010000002037372'), //Mauritania + array('MU17BOMM0101101030300200000MUR'), //Mauritius + array('MZ59000100000011834194157'), //Mozambique + array('PS92PALS000000000400123456702'), //Palestinian Territory + array('QA58DOHB00001234567890ABCDEFG'), //Qatar + array('XK051212012345678906'), //Republic of Kosovo + array('PT50000200000163099310355'), //Sao Tome and Principe + array('SA0380000000608010167519'), //Saudi Arabia + array('SN12K00100152000025690007542'), //Senegal + array('TL380080012345678910157'), //Timor-Leste + array('TN5914207207100707129648'), //Tunisia + array('TR330006100519786457841326'), //Turkey + array('UA213223130000026007233566001'), //Ukraine + array('AE260211000000230064016'), //United Arab Emirates + ); + } + + /** + * @dataProvider getIbansWithInvalidFormat + */ + public function testIbansWithInvalidFormat($iban) + { + $this->assertViolationRaised($iban, Iban::INVALID_FORMAT_ERROR); + } + + public function getIbansWithInvalidFormat() + { + return array( + array('AL47 2121 1009 0000 0002 3569 874'), //Albania + array('AD12 0001 2030 2003 5910 010'), //Andorra + array('AT61 1904 3002 3457 320'), //Austria + array('AZ21 NABZ 0000 0000 1370 1000 194'), //Azerbaijan + array('AZ21 N1BZ 0000 0000 1370 1000 1944'), //Azerbaijan + array('BH67 BMAG 0000 1299 1234 5'), //Bahrain + array('BH67 B2AG 0000 1299 1234 56'), //Bahrain + array('BE62 5100 0754 7061 2'), //Belgium + array('BA39 1290 0794 0102 8494 4'), //Bosnia and Herzegovina + array('BG80 BNBG 9661 1020 3456 7'), //Bulgaria + array('BG80 B2BG 9661 1020 3456 78'), //Bulgaria + array('BY 13 NBRB 3600 900000002Z00AB001'), //Belarus + array('BY 13 NBRB 3600 900000002Z00AB0'), //Belarus + array('BYRO NBRB 3600 900000002Z00AB0'), //Belarus + array('BY 13 3600 NBRB 900000002Z00AB05'), //Belarus + array('HR12 1001 0051 8630 0016 01'), //Croatia + array('CY17 0020 0128 0000 0012 0052 7600 1'), //Cyprus + array('CZ65 0800 0000 1920 0014 5399 1'), //Czech Republic + array('DK50 0040 0440 1162 431'), //Denmark + array('EE38 2200 2210 2014 5685 1'), //Estonia + array('FO97 5432 0388 8999 441'), //Faroe Islands + array('FI21 1234 5600 0007 851'), //Finland + array('FR14 2004 1010 0505 0001 3M02 6061'), //France + array('GE29 NB00 0000 0101 9049 171'), //Georgia + array('DE89 3704 0044 0532 0130 001'), //Germany + array('GI75 NWBK 0000 0000 7099 4531'), //Gibraltar + array('GR16 0110 1250 0000 0001 2300 6951'), //Greece + array('GL56 0444 9876 5432 101'), //Greenland + array('HU42 1177 3016 1111 1018 0000 0000 1'), //Hungary + array('IS14 0159 2600 7654 5510 7303 391'), //Iceland + array('IE29 AIBK 9311 5212 3456 781'), //Ireland + array('IL62 0108 0000 0009 9999 9991'), //Israel + array('IT40 S054 2811 1010 0000 0123 4561'), //Italy + array('LV80 BANK 0000 4351 9500 11'), //Latvia + array('LB62 0999 0000 0001 0019 0122 9114 1'), //Lebanon + array('LI21 0881 0000 2324 013A A1'), //Liechtenstein + array('LT12 1000 0111 0100 1000 1'), //Lithuania + array('LU28 0019 4006 4475 0000 1'), //Luxembourg + array('MK072 5012 0000 0589 84 1'), //Macedonia + array('MT84 MALT 0110 0001 2345 MTLC AST0 01SA'), //Malta + array('MU17 BOMM 0101 1010 3030 0200 000M URA'), //Mauritius + array('MD24 AG00 0225 1000 1310 4168 1'), //Moldova + array('MC93 2005 2222 1001 1223 3M44 5551'), //Monaco + array('ME25 5050 0001 2345 6789 511'), //Montenegro + array('NL39 RABO 0300 0652 641'), //Netherlands + array('NO93 8601 1117 9471'), //Norway + array('PK36 SCBL 0000 0011 2345 6702 1'), //Pakistan + array('PL60 1020 1026 0000 0422 7020 1111 1'), //Poland + array('PT50 0002 0123 1234 5678 9015 41'), //Portugal + array('RO49 AAAA 1B31 0075 9384 0000 1'), //Romania + array('SM86 U032 2509 8000 0000 0270 1001'), //San Marino + array('SA03 8000 0000 6080 1016 7519 1'), //Saudi Arabia + array('RS35 2600 0560 1001 6113 791'), //Serbia + array('SK31 1200 0000 1987 4263 7541 1'), //Slovak Republic + array('SI56 1910 0000 0123 4381'), //Slovenia + array('ES80 2310 0001 1800 0001 2345 1'), //Spain + array('SE35 5000 0000 0549 1000 0003 1'), //Sweden + array('CH93 0076 2011 6238 5295 71'), //Switzerland + array('TN59 1000 6035 1835 9847 8831 1'), //Tunisia + array('TR33 0006 1005 1978 6457 8413 261'), //Turkey + array('AE07 0331 2345 6789 0123 4561'), //UAE + array('GB12 CPBK 0892 9965 0449 911'), //United Kingdom + + //Extended country list + array('AO060006000001000371311741'), //Angola + array('AZ21NABZ000000001370100019441'), //Azerbaijan + array('BH29BMAG1299123456BH001'), //Bahrain + array('BJ11B006101004002711011925911'), //Benin + array('BR9700360305000010009795493P11'), // Brazil + array('BR1800000000141455123924100C21'), // Brazil + array('VG96VPVG00000123456789011'), //British Virgin Islands + array('BF10301340200154009450006431'), //Burkina Faso + array('BI432010110674441'), //Burundi + array('CM21100030010005000006053061'), //Cameroon + array('CV640003000045470691101761'), //Cape Verde + array('FR76300070001100099700049421'), //Central African Republic + array('CG52300110002021512345678901'), //Congo + array('CR05152020010262840661'), //Costa Rica + array('CR0515202001026284066'), //Costa Rica + array('DO28BAGR000000012124536113241'), //Dominican Republic + array('GT82TRAJ010200000012100296901'), //Guatemala + array('IR5805401051800212731130071'), //Iran + array('IL6201080000000999999991'), //Israel + array('CI05A000601741001785300118521'), //Ivory Coast + array('JO94CBJO00100000000001310003021'), // Jordan + array('KZ1760102510000429931'), //Kazakhstan + array('KW74NBOK00000000000010003721511'), //Kuwait + array('LB300999000000010019255791151'), //Lebanon + array('MG46000050300101019140160561'), //Madagascar + array('ML03D008901700010021200004471'), //Mali + array('MR13000120000100000020373721'), //Mauritania + array('MU17BOMM0101101030300200000MUR1'), //Mauritius + array('MZ590001000000118341941571'), //Mozambique + array('PS92PALS0000000004001234567021'), //Palestinian Territory + array('QA58DOHB00001234567890ABCDEFG1'), //Qatar + array('XK0512120123456789061'), //Republic of Kosovo + array('PT500002000001630993103551'), //Sao Tome and Principe + array('SA03800000006080101675191'), //Saudi Arabia + array('SN12K001001520000256900075421'), //Senegal + array('TL3800800123456789101571'), //Timor-Leste + array('TN59142072071007071296481'), //Tunisia + array('TR3300061005197864578413261'), //Turkey + array('UA21AAAA1300000260072335660012'), //Ukraine + array('AE2602110000002300640161'), //United Arab Emirates + ); + } + + /** + * @dataProvider getIbansWithValidFormatButIncorrectChecksum + */ + public function testIbansWithValidFormatButIncorrectChecksum($iban) + { + $this->assertViolationRaised($iban, Iban::CHECKSUM_FAILED_ERROR); + } + + public function getIbansWithValidFormatButIncorrectChecksum() + { + return array( + array('AL47 2121 1009 0000 0002 3569 8742'), //Albania + array('AD12 0001 2030 2003 5910 0101'), //Andorra + array('AT61 1904 3002 3457 3202'), //Austria + array('AZ21 NABZ 0000 0000 1370 1000 1945'), //Azerbaijan + array('BH67 BMAG 0000 1299 1234 57'), //Bahrain + array('BE62 5100 0754 7062'), //Belgium + array('BA39 1290 0794 0102 8495'), //Bosnia and Herzegovina + array('BG80 BNBG 9661 1020 3456 79'), //Bulgaria + array('BY90 NBRB 3600 900000002Z00AB00'), //Belarus + array('HR12 1001 0051 8630 0016 1'), //Croatia + array('CY17 0020 0128 0000 0012 0052 7601'), //Cyprus + array('CZ65 0800 0000 1920 0014 5398'), //Czech Republic + array('DK50 0040 0440 1162 44'), //Denmark + array('EE38 2200 2210 2014 5684'), //Estonia + array('FO97 5432 0388 8999 43'), //Faroe Islands + array('FI21 1234 5600 0007 84'), //Finland + array('FR14 2004 1010 0505 0001 3M02 605'), //France + array('GE29 NB00 0000 0101 9049 16'), //Georgia + array('DE89 3704 0044 0532 0130 01'), //Germany + array('GI75 NWBK 0000 0000 7099 452'), //Gibraltar + array('GR16 0110 1250 0000 0001 2300 694'), //Greece + array('GL56 0444 9876 5432 11'), //Greenland + array('HU42 1177 3016 1111 1018 0000 0001'), //Hungary + array('IS14 0159 2600 7654 5510 7303 38'), //Iceland + array('IE29 AIBK 9311 5212 3456 79'), //Ireland + array('IL62 0108 0000 0009 9999 998'), //Israel + array('IT40 S054 2811 1010 0000 0123 457'), //Italy + array('LV80 BANK 0000 4351 9500 2'), //Latvia + array('LB62 0999 0000 0001 0019 0122 9115'), //Lebanon + array('LI21 0881 0000 2324 013A B'), //Liechtenstein + array('LT12 1000 0111 0100 1001'), //Lithuania + array('LU28 0019 4006 4475 0001'), //Luxembourg + array('MK072 5012 0000 0589 85'), //Macedonia + array('MT84 MALT 0110 0001 2345 MTLC AST0 01T'), //Malta + array('MU17 BOMM 0101 1010 3030 0200 000M UP'), //Mauritius + array('MD24 AG00 0225 1000 1310 4169'), //Moldova + array('MC93 2005 2222 1001 1223 3M44 554'), //Monaco + array('ME25 5050 0001 2345 6789 52'), //Montenegro + array('NL39 RABO 0300 0652 65'), //Netherlands + array('NO93 8601 1117 948'), //Norway + array('PK36 SCBL 0000 0011 2345 6703'), //Pakistan + array('PL60 1020 1026 0000 0422 7020 1112'), //Poland + array('PT50 0002 0123 1234 5678 9015 5'), //Portugal + array('RO49 AAAA 1B31 0075 9384 0001'), //Romania + array('SM86 U032 2509 8000 0000 0270 101'), //San Marino + array('SA03 8000 0000 6080 1016 7518'), //Saudi Arabia + array('RS35 2600 0560 1001 6113 78'), //Serbia + array('SK31 1200 0000 1987 4263 7542'), //Slovak Republic + array('SI56 1910 0000 0123 439'), //Slovenia + array('ES80 2310 0001 1800 0001 2346'), //Spain + array('SE35 5000 0000 0549 1000 0004'), //Sweden + array('CH93 0076 2011 6238 5295 8'), //Switzerland + array('TN59 1000 6035 1835 9847 8832'), //Tunisia + array('TR33 0006 1005 1978 6457 8413 27'), //Turkey + array('AE07 0331 2345 6789 0123 457'), //UAE + array('GB12 CPBK 0892 9965 0449 92'), //United Kingdom + + //Extended country list + array('AO06000600000100037131175'), //Angola + array('AZ21NABZ00000000137010001945'), //Azerbaijan + array('BH29BMAG1299123456BH01'), //Bahrain + array('BJ11B00610100400271101192592'), //Benin + array('BR9700360305000010009795493P2'), // Brazil + array('BR1800000000141455123924100C3'), // Brazil + array('VG96VPVG0000012345678902'), //British Virgin Islands + array('BF1030134020015400945000644'), //Burkina Faso + array('BI43201011067445'), //Burundi + array('CM2110003001000500000605307'), //Cameroon + array('CV64000300004547069110177'), //Cape Verde + array('FR7630007000110009970004943'), //Central African Republic + array('CG5230011000202151234567891'), //Congo + array('CR96042332432534543564'), //Costa Rica + array('DO28BAGR00000001212453611325'), //Dominican Republic + array('GT82TRAJ01020000001210029691'), //Guatemala + array('IR580540105180021273113008'), //Iran + array('IL620108000000099999998'), //Israel + array('CI05A00060174100178530011853'), //Ivory Coast + array('JO94CBJO0010000000000131000303'), // Jordan + array('KZ176010251000042994'), //Kazakhstan + array('KW74NBOK0000000000001000372152'), //Kuwait + array('LB30099900000001001925579116'), //Lebanon + array('MG4600005030010101914016057'), //Madagascar + array('ML03D00890170001002120000448'), //Mali + array('MR1300012000010000002037373'), //Mauritania + array('MU17BOMM0101101030300200000MUP'), //Mauritius + array('MZ59000100000011834194158'), //Mozambique + array('PS92PALS000000000400123456703'), //Palestinian Territory + array('QA58DOHB00001234567890ABCDEFH'), //Qatar + array('XK051212012345678907'), //Republic of Kosovo + array('PT50000200000163099310356'), //Sao Tome and Principe + array('SA0380000000608010167518'), //Saudi Arabia + array('SN12K00100152000025690007543'), //Senegal + array('TL380080012345678910158'), //Timor-Leste + array('TN5914207207100707129649'), //Tunisia + array('TR330006100519786457841327'), //Turkey + array('UA213223130000026007233566002'), //Ukraine + array('AE260211000000230064017'), //United Arab Emirates + ); + } + + /** + * @dataProvider getUnsupportedCountryCodes + */ + public function testIbansWithUnsupportedCountryCode($countryCode) + { + $this->assertViolationRaised($countryCode.'260211000000230064016', Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR); + } + + public function getUnsupportedCountryCodes() + { + return array( + array('AG'), + array('AI'), + array('AQ'), + array('AS'), + array('AW'), + ); + } + + public function testIbansWithInvalidCharacters() + { + $this->assertViolationRaised('CH930076201162385295]', Iban::INVALID_CHARACTERS_ERROR); + } + + /** + * @dataProvider getIbansWithInvalidCountryCode + */ + public function testIbansWithInvalidCountryCode($iban) + { + $this->assertViolationRaised($iban, Iban::INVALID_COUNTRY_CODE_ERROR); + } + + public function getIbansWithInvalidCountryCode() + { + return array( + array('0750447346'), + array('2X0750447346'), + array('A20750447346'), + ); + } + + private function assertViolationRaised($iban, $code) + { + $constraint = new Iban(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($iban, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$iban.'"') + ->setCode($code) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IdenticalToValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IdenticalToValidatorTest.php new file mode 100644 index 0000000..4999919 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IdenticalToValidatorTest.php @@ -0,0 +1,94 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\IdenticalTo; +use Symfony\Component\Validator\Constraints\IdenticalToValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Daniel Holmes <daniel@danielholmes.org> + */ +class IdenticalToValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new IdenticalToValidator(); + } + + protected function createConstraint(array $options = null) + { + return new IdenticalTo($options); + } + + protected function getErrorCode() + { + return IdenticalTo::NOT_IDENTICAL_ERROR; + } + + public function provideAllValidComparisons() + { + $this->setDefaultTimezone('UTC'); + + // Don't call addPhp5Dot5Comparisons() automatically, as it does + // not take care of identical objects + $comparisons = $this->provideValidComparisons(); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + $date = new \DateTime('2000-01-01'); + $object = new ComparisonTest_Class(2); + + $comparisons = array( + array(3, 3), + array('a', 'a'), + array($date, $date), + array($object, $object), + array(null, 1), + ); + + if (\PHP_VERSION_ID >= 50500) { + $immutableDate = new \DateTimeImmutable('2000-01-01'); + $comparisons[] = array($immutableDate, $immutableDate); + } + + return $comparisons; + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array(2, '2', '2', '"2"', 'string'), + array('22', '"22"', '333', '"333"', 'string'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', 'DateTime'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('1999-01-01'), 'Jan 1, 1999, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php new file mode 100644 index 0000000..4605a06 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php @@ -0,0 +1,332 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Image; +use Symfony\Component\Validator\Constraints\ImageValidator; +use Symfony\Component\Validator\Validation; + +/** + * @requires extension fileinfo + */ +class ImageValidatorTest extends AbstractConstraintValidatorTest +{ + protected $context; + + /** + * @var ImageValidator + */ + protected $validator; + + protected $path; + protected $image; + protected $imageLandscape; + protected $imagePortrait; + protected $image4By3; + + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new ImageValidator(); + } + + protected function setUp() + { + parent::setUp(); + + $this->image = __DIR__.'/Fixtures/test.gif'; + $this->imageLandscape = __DIR__.'/Fixtures/test_landscape.gif'; + $this->imagePortrait = __DIR__.'/Fixtures/test_portrait.gif'; + $this->image4By3 = __DIR__.'/Fixtures/test_4by3.gif'; + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Image()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Image()); + + $this->assertNoViolation(); + } + + public function testValidImage() + { + $this->validator->validate($this->image, new Image()); + + $this->assertNoViolation(); + } + + public function testFileNotFound() + { + // Check that the logic from FileValidator still works + $constraint = new Image(array( + 'notFoundMessage' => 'myMessage', + )); + + $this->validator->validate('foobar', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ file }}', '"foobar"') + ->setCode(Image::NOT_FOUND_ERROR) + ->assertRaised(); + } + + public function testValidSize() + { + $constraint = new Image(array( + 'minWidth' => 1, + 'maxWidth' => 2, + 'minHeight' => 1, + 'maxHeight' => 2, + )); + + $this->validator->validate($this->image, $constraint); + + $this->assertNoViolation(); + } + + public function testWidthTooSmall() + { + $constraint = new Image(array( + 'minWidth' => 3, + 'minWidthMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', '2') + ->setParameter('{{ min_width }}', '3') + ->setCode(Image::TOO_NARROW_ERROR) + ->assertRaised(); + } + + public function testWidthTooBig() + { + $constraint = new Image(array( + 'maxWidth' => 1, + 'maxWidthMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', '2') + ->setParameter('{{ max_width }}', '1') + ->setCode(Image::TOO_WIDE_ERROR) + ->assertRaised(); + } + + public function testHeightTooSmall() + { + $constraint = new Image(array( + 'minHeight' => 3, + 'minHeightMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ height }}', '2') + ->setParameter('{{ min_height }}', '3') + ->setCode(Image::TOO_LOW_ERROR) + ->assertRaised(); + } + + public function testHeightTooBig() + { + $constraint = new Image(array( + 'maxHeight' => 1, + 'maxHeightMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ height }}', '2') + ->setParameter('{{ max_height }}', '1') + ->setCode(Image::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMinWidth() + { + $constraint = new Image(array( + 'minWidth' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxWidth() + { + $constraint = new Image(array( + 'maxWidth' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMinHeight() + { + $constraint = new Image(array( + 'minHeight' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxHeight() + { + $constraint = new Image(array( + 'maxHeight' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + public function testRatioTooSmall() + { + $constraint = new Image(array( + 'minRatio' => 2, + 'minRatioMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ ratio }}', 1) + ->setParameter('{{ min_ratio }}', 2) + ->setCode(Image::RATIO_TOO_SMALL_ERROR) + ->assertRaised(); + } + + public function testRatioTooBig() + { + $constraint = new Image(array( + 'maxRatio' => 0.5, + 'maxRatioMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ ratio }}', 1) + ->setParameter('{{ max_ratio }}', 0.5) + ->setCode(Image::RATIO_TOO_BIG_ERROR) + ->assertRaised(); + } + + public function testMaxRatioUsesTwoDecimalsOnly() + { + $constraint = new Image(array( + 'maxRatio' => 1.33, + )); + + $this->validator->validate($this->image4By3, $constraint); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMinRatio() + { + $constraint = new Image(array( + 'minRatio' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxRatio() + { + $constraint = new Image(array( + 'maxRatio' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + public function testSquareNotAllowed() + { + $constraint = new Image(array( + 'allowSquare' => false, + 'allowSquareMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', 2) + ->setParameter('{{ height }}', 2) + ->setCode(Image::SQUARE_NOT_ALLOWED_ERROR) + ->assertRaised(); + } + + public function testLandscapeNotAllowed() + { + $constraint = new Image(array( + 'allowLandscape' => false, + 'allowLandscapeMessage' => 'myMessage', + )); + + $this->validator->validate($this->imageLandscape, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', 2) + ->setParameter('{{ height }}', 1) + ->setCode(Image::LANDSCAPE_NOT_ALLOWED_ERROR) + ->assertRaised(); + } + + public function testPortraitNotAllowed() + { + $constraint = new Image(array( + 'allowPortrait' => false, + 'allowPortraitMessage' => 'myMessage', + )); + + $this->validator->validate($this->imagePortrait, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', 1) + ->setParameter('{{ height }}', 2) + ->setCode(Image::PORTRAIT_NOT_ALLOWED_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IpValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IpValidatorTest.php new file mode 100644 index 0000000..bcb5f59 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IpValidatorTest.php @@ -0,0 +1,456 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Ip; +use Symfony\Component\Validator\Constraints\IpValidator; +use Symfony\Component\Validator\Validation; + +class IpValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new IpValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Ip()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Ip()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Ip()); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidValidatorVersion() + { + new Ip(array( + 'version' => 666, + )); + } + + /** + * @dataProvider getValidIpsV4 + */ + public function testValidIpsV4($ip) + { + $this->validator->validate($ip, new Ip(array( + 'version' => Ip::V4, + ))); + + $this->assertNoViolation(); + } + + public function getValidIpsV4() + { + return array( + array('0.0.0.0'), + array('10.0.0.0'), + array('123.45.67.178'), + array('172.16.0.0'), + array('192.168.1.0'), + array('224.0.0.1'), + array('255.255.255.255'), + array('127.0.0.0'), + ); + } + + /** + * @dataProvider getValidIpsV6 + */ + public function testValidIpsV6($ip) + { + $this->validator->validate($ip, new Ip(array( + 'version' => Ip::V6, + ))); + + $this->assertNoViolation(); + } + + public function getValidIpsV6() + { + return array( + array('2001:0db8:85a3:0000:0000:8a2e:0370:7334'), + array('2001:0DB8:85A3:0000:0000:8A2E:0370:7334'), + array('2001:0Db8:85a3:0000:0000:8A2e:0370:7334'), + array('fdfe:dcba:9876:ffff:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:0000:8a2e:0370:7334'), + array('fe80:0000:0000:0000:0202:b3ff:fe1e:8329'), + array('fe80:0:0:0:202:b3ff:fe1e:8329'), + array('fe80::202:b3ff:fe1e:8329'), + array('0:0:0:0:0:0:0:0'), + array('::'), + array('0::'), + array('::0'), + array('0::0'), + // IPv4 mapped to IPv6 + array('2001:0db8:85a3:0000:0000:8a2e:0.0.0.0'), + array('::0.0.0.0'), + array('::255.255.255.255'), + array('::123.45.67.178'), + ); + } + + /** + * @dataProvider getValidIpsAll + */ + public function testValidIpsAll($ip) + { + $this->validator->validate($ip, new Ip(array( + 'version' => Ip::ALL, + ))); + + $this->assertNoViolation(); + } + + public function getValidIpsAll() + { + return array_merge($this->getValidIpsV4(), $this->getValidIpsV6()); + } + + /** + * @dataProvider getInvalidIpsV4 + */ + public function testInvalidIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidIpsV4() + { + return array( + array('0'), + array('0.0'), + array('0.0.0'), + array('256.0.0.0'), + array('0.256.0.0'), + array('0.0.256.0'), + array('0.0.0.256'), + array('-1.0.0.0'), + array('foobar'), + ); + } + + /** + * @dataProvider getInvalidPrivateIpsV4 + */ + public function testInvalidPrivateIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4_NO_PRIV, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPrivateIpsV4() + { + return array( + array('10.0.0.0'), + array('172.16.0.0'), + array('192.168.1.0'), + ); + } + + /** + * @dataProvider getInvalidReservedIpsV4 + */ + public function testInvalidReservedIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4_NO_RES, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidReservedIpsV4() + { + return array( + array('0.0.0.0'), + array('240.0.0.1'), + array('255.255.255.255'), + ); + } + + /** + * @dataProvider getInvalidPublicIpsV4 + */ + public function testInvalidPublicIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4_ONLY_PUBLIC, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPublicIpsV4() + { + return array_merge($this->getInvalidPrivateIpsV4(), $this->getInvalidReservedIpsV4()); + } + + /** + * @dataProvider getInvalidIpsV6 + */ + public function testInvalidIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidIpsV6() + { + return array( + array('z001:0db8:85a3:0000:0000:8a2e:0370:7334'), + array('fe80'), + array('fe80:8329'), + array('fe80:::202:b3ff:fe1e:8329'), + array('fe80::202:b3ff::fe1e:8329'), + // IPv4 mapped to IPv6 + array('2001:0db8:85a3:0000:0000:8a2e:0370:0.0.0.0'), + array('::0.0'), + array('::0.0.0'), + array('::256.0.0.0'), + array('::0.256.0.0'), + array('::0.0.256.0'), + array('::0.0.0.256'), + ); + } + + /** + * @dataProvider getInvalidPrivateIpsV6 + */ + public function testInvalidPrivateIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6_NO_PRIV, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPrivateIpsV6() + { + return array( + array('fdfe:dcba:9876:ffff:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:0000:8a2e:0370:7334'), + ); + } + + /** + * @dataProvider getInvalidReservedIpsV6 + */ + public function testInvalidReservedIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6_NO_RES, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidReservedIpsV6() + { + // Quoting after official filter documentation: + // "FILTER_FLAG_NO_RES_RANGE = This flag does not apply to IPv6 addresses." + // Full description: http://php.net/manual/en/filter.filters.flags.php + return $this->getInvalidIpsV6(); + } + + /** + * @dataProvider getInvalidPublicIpsV6 + */ + public function testInvalidPublicIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6_ONLY_PUBLIC, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPublicIpsV6() + { + return array_merge($this->getInvalidPrivateIpsV6(), $this->getInvalidReservedIpsV6()); + } + + /** + * @dataProvider getInvalidIpsAll + */ + public function testInvalidIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidIpsAll() + { + return array_merge($this->getInvalidIpsV4(), $this->getInvalidIpsV6()); + } + + /** + * @dataProvider getInvalidPrivateIpsAll + */ + public function testInvalidPrivateIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL_NO_PRIV, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPrivateIpsAll() + { + return array_merge($this->getInvalidPrivateIpsV4(), $this->getInvalidPrivateIpsV6()); + } + + /** + * @dataProvider getInvalidReservedIpsAll + */ + public function testInvalidReservedIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL_NO_RES, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidReservedIpsAll() + { + return array_merge($this->getInvalidReservedIpsV4(), $this->getInvalidReservedIpsV6()); + } + + /** + * @dataProvider getInvalidPublicIpsAll + */ + public function testInvalidPublicIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL_ONLY_PUBLIC, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPublicIpsAll() + { + return array_merge($this->getInvalidPublicIpsV4(), $this->getInvalidPublicIpsV6()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsFalseValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsFalseValidatorTest.php new file mode 100644 index 0000000..46cadec --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsFalseValidatorTest.php @@ -0,0 +1,57 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\IsFalse; +use Symfony\Component\Validator\Constraints\IsFalseValidator; +use Symfony\Component\Validator\Validation; + +class IsFalseValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new IsFalseValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new IsFalse()); + + $this->assertNoViolation(); + } + + public function testFalseIsValid() + { + $this->validator->validate(false, new IsFalse()); + + $this->assertNoViolation(); + } + + public function testTrueIsInvalid() + { + $constraint = new IsFalse(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(true, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'true') + ->setCode(IsFalse::NOT_FALSE_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsNullValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsNullValidatorTest.php new file mode 100644 index 0000000..5a55753 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsNullValidatorTest.php @@ -0,0 +1,67 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\IsNull; +use Symfony\Component\Validator\Constraints\IsNullValidator; +use Symfony\Component\Validator\Validation; + +class IsNullValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new IsNullValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new IsNull()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidValues + */ + public function testInvalidValues($value, $valueAsString) + { + $constraint = new IsNull(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $valueAsString) + ->setCode(IsNull::NOT_NULL_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array(0, '0'), + array(false, 'false'), + array(true, 'true'), + array('', '""'), + array('foo bar', '"foo bar"'), + array(new \DateTime(), 'object'), + array(new \stdClass(), 'object'), + array(array(), 'array'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsTrueValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsTrueValidatorTest.php new file mode 100644 index 0000000..1c5927d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsTrueValidatorTest.php @@ -0,0 +1,57 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\IsTrueValidator; +use Symfony\Component\Validator\Validation; + +class IsTrueValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new IsTrueValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new IsTrue()); + + $this->assertNoViolation(); + } + + public function testTrueIsValid() + { + $this->validator->validate(true, new IsTrue()); + + $this->assertNoViolation(); + } + + public function testFalseIsInvalid() + { + $constraint = new IsTrue(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(false, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'false') + ->setCode(IsTrue::NOT_TRUE_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsbnValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsbnValidatorTest.php new file mode 100644 index 0000000..314739f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsbnValidatorTest.php @@ -0,0 +1,271 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Isbn; +use Symfony\Component\Validator\Constraints\IsbnValidator; +use Symfony\Component\Validator\Validation; + +/** + * @see https://en.wikipedia.org/wiki/Isbn + */ +class IsbnValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new IsbnValidator(); + } + + public function getValidIsbn10() + { + return array( + array('2723442284'), + array('2723442276'), + array('2723455041'), + array('2070546810'), + array('2711858839'), + array('2756406767'), + array('2870971648'), + array('226623854X'), + array('2851806424'), + array('0321812700'), + array('0-45122-5244'), + array('0-4712-92311'), + array('0-9752298-0-X'), + ); + } + + public function getInvalidIsbn10() + { + return array( + array('27234422841', Isbn::TOO_LONG_ERROR), + array('272344228', Isbn::TOO_SHORT_ERROR), + array('0-4712-9231', Isbn::TOO_SHORT_ERROR), + array('1234567890', Isbn::CHECKSUM_FAILED_ERROR), + array('0987656789', Isbn::CHECKSUM_FAILED_ERROR), + array('7-35622-5444', Isbn::CHECKSUM_FAILED_ERROR), + array('0-4X19-92611', Isbn::CHECKSUM_FAILED_ERROR), + array('0_45122_5244', Isbn::INVALID_CHARACTERS_ERROR), + array('2870#971#648', Isbn::INVALID_CHARACTERS_ERROR), + array('0-9752298-0-x', Isbn::INVALID_CHARACTERS_ERROR), + array('1A34567890', Isbn::INVALID_CHARACTERS_ERROR), + // chr(1) evaluates to 0 + // 2070546810 is valid + array('2'.\chr(1).'70546810', Isbn::INVALID_CHARACTERS_ERROR), + ); + } + + public function getValidIsbn13() + { + return array( + array('978-2723442282'), + array('978-2723442275'), + array('978-2723455046'), + array('978-2070546817'), + array('978-2711858835'), + array('978-2756406763'), + array('978-2870971642'), + array('978-2266238540'), + array('978-2851806420'), + array('978-0321812704'), + array('978-0451225245'), + array('978-0471292319'), + ); + } + + public function getInvalidIsbn13() + { + return array( + array('978-27234422821', Isbn::TOO_LONG_ERROR), + array('978-272344228', Isbn::TOO_SHORT_ERROR), + array('978-2723442-82', Isbn::TOO_SHORT_ERROR), + array('978-2723442281', Isbn::CHECKSUM_FAILED_ERROR), + array('978-0321513774', Isbn::CHECKSUM_FAILED_ERROR), + array('979-0431225385', Isbn::CHECKSUM_FAILED_ERROR), + array('980-0474292319', Isbn::CHECKSUM_FAILED_ERROR), + array('0-4X19-92619812', Isbn::INVALID_CHARACTERS_ERROR), + array('978_2723442282', Isbn::INVALID_CHARACTERS_ERROR), + array('978#2723442282', Isbn::INVALID_CHARACTERS_ERROR), + array('978-272C442282', Isbn::INVALID_CHARACTERS_ERROR), + // chr(1) evaluates to 0 + // 978-2070546817 is valid + array('978-2'.\chr(1).'70546817', Isbn::INVALID_CHARACTERS_ERROR), + ); + } + + public function getValidIsbn() + { + return array_merge( + $this->getValidIsbn10(), + $this->getValidIsbn13() + ); + } + + public function getInvalidIsbn() + { + return array_merge( + $this->getInvalidIsbn10(), + $this->getInvalidIsbn13() + ); + } + + public function testNullIsValid() + { + $constraint = new Isbn(true); + + $this->validator->validate(null, $constraint); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $constraint = new Isbn(true); + + $this->validator->validate('', $constraint); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $constraint = new Isbn(true); + + $this->validator->validate(new \stdClass(), $constraint); + } + + /** + * @dataProvider getValidIsbn10 + */ + public function testValidIsbn10($isbn) + { + $constraint = new Isbn(array( + 'type' => 'isbn10', + )); + + $this->validator->validate($isbn, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidIsbn10 + */ + public function testInvalidIsbn10($isbn, $code) + { + $constraint = new Isbn(array( + 'type' => 'isbn10', + 'isbn10Message' => 'myMessage', + )); + + $this->validator->validate($isbn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$isbn.'"') + ->setCode($code) + ->assertRaised(); + } + + /** + * @dataProvider getValidIsbn13 + */ + public function testValidIsbn13($isbn) + { + $constraint = new Isbn(array('type' => 'isbn13')); + + $this->validator->validate($isbn, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidIsbn13 + */ + public function testInvalidIsbn13($isbn, $code) + { + $constraint = new Isbn(array( + 'type' => 'isbn13', + 'isbn13Message' => 'myMessage', + )); + + $this->validator->validate($isbn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$isbn.'"') + ->setCode($code) + ->assertRaised(); + } + + /** + * @dataProvider getValidIsbn + */ + public function testValidIsbnAny($isbn) + { + $constraint = new Isbn(); + + $this->validator->validate($isbn, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidIsbn10 + */ + public function testInvalidIsbnAnyIsbn10($isbn, $code) + { + $constraint = new Isbn(array( + 'bothIsbnMessage' => 'myMessage', + )); + + $this->validator->validate($isbn, $constraint); + + // Too long for an ISBN-10, but not long enough for an ISBN-13 + if (Isbn::TOO_LONG_ERROR === $code) { + $code = Isbn::TYPE_NOT_RECOGNIZED_ERROR; + } + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$isbn.'"') + ->setCode($code) + ->assertRaised(); + } + + /** + * @dataProvider getInvalidIsbn13 + */ + public function testInvalidIsbnAnyIsbn13($isbn, $code) + { + $constraint = new Isbn(array( + 'bothIsbnMessage' => 'myMessage', + )); + + $this->validator->validate($isbn, $constraint); + + // Too short for an ISBN-13, but not short enough for an ISBN-10 + if (Isbn::TOO_SHORT_ERROR === $code) { + $code = Isbn::TYPE_NOT_RECOGNIZED_ERROR; + } + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$isbn.'"') + ->setCode($code) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IssnValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IssnValidatorTest.php new file mode 100644 index 0000000..a6d3994 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IssnValidatorTest.php @@ -0,0 +1,187 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Issn; +use Symfony\Component\Validator\Constraints\IssnValidator; +use Symfony\Component\Validator\Validation; + +/** + * @see https://en.wikipedia.org/wiki/Issn + */ +class IssnValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new IssnValidator(); + } + + public function getValidLowerCasedIssn() + { + return array( + array('2162-321x'), + array('2160-200x'), + array('1537-453x'), + array('1937-710x'), + array('0002-922x'), + array('1553-345x'), + array('1553-619x'), + ); + } + + public function getValidNonHyphenatedIssn() + { + return array( + array('2162321X'), + array('01896016'), + array('15744647'), + array('14350645'), + array('07174055'), + array('20905076'), + array('14401592'), + ); + } + + public function getFullValidIssn() + { + return array( + array('1550-7416'), + array('1539-8560'), + array('2156-5376'), + array('1119-023X'), + array('1684-5315'), + array('1996-0786'), + array('1684-5374'), + array('1996-0794'), + ); + } + + public function getValidIssn() + { + return array_merge( + $this->getValidLowerCasedIssn(), + $this->getValidNonHyphenatedIssn(), + $this->getFullValidIssn() + ); + } + + public function getInvalidIssn() + { + return array( + array(0, Issn::TOO_SHORT_ERROR), + array('1539', Issn::TOO_SHORT_ERROR), + array('2156-537A', Issn::INVALID_CHARACTERS_ERROR), + array('1119-0231', Issn::CHECKSUM_FAILED_ERROR), + array('1684-5312', Issn::CHECKSUM_FAILED_ERROR), + array('1996-0783', Issn::CHECKSUM_FAILED_ERROR), + array('1684-537X', Issn::CHECKSUM_FAILED_ERROR), + array('1996-0795', Issn::CHECKSUM_FAILED_ERROR), + ); + } + + public function testNullIsValid() + { + $constraint = new Issn(); + + $this->validator->validate(null, $constraint); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $constraint = new Issn(); + + $this->validator->validate('', $constraint); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $constraint = new Issn(); + $this->validator->validate(new \stdClass(), $constraint); + } + + /** + * @dataProvider getValidLowerCasedIssn + */ + public function testCaseSensitiveIssns($issn) + { + $constraint = new Issn(array( + 'caseSensitive' => true, + 'message' => 'myMessage', + )); + + $this->validator->validate($issn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$issn.'"') + ->setCode(Issn::INVALID_CASE_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getValidNonHyphenatedIssn + */ + public function testRequireHyphenIssns($issn) + { + $constraint = new Issn(array( + 'requireHyphen' => true, + 'message' => 'myMessage', + )); + + $this->validator->validate($issn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$issn.'"') + ->setCode(Issn::MISSING_HYPHEN_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getValidIssn + */ + public function testValidIssn($issn) + { + $constraint = new Issn(); + + $this->validator->validate($issn, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidIssn + */ + public function testInvalidIssn($issn, $code) + { + $constraint = new Issn(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($issn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$issn.'"') + ->setCode($code) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LanguageValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LanguageValidatorTest.php new file mode 100644 index 0000000..d9bd4d0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LanguageValidatorTest.php @@ -0,0 +1,110 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraints\Language; +use Symfony\Component\Validator\Constraints\LanguageValidator; +use Symfony\Component\Validator\Validation; + +class LanguageValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new LanguageValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Language()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Language()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Language()); + } + + /** + * @dataProvider getValidLanguages + */ + public function testValidLanguages($language) + { + $this->validator->validate($language, new Language()); + + $this->assertNoViolation(); + } + + public function getValidLanguages() + { + return array( + array('en'), + array('en_US'), + array('my'), + ); + } + + /** + * @dataProvider getInvalidLanguages + */ + public function testInvalidLanguages($language) + { + $constraint = new Language(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($language, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$language.'"') + ->setCode(Language::NO_SUCH_LANGUAGE_ERROR) + ->assertRaised(); + } + + public function getInvalidLanguages() + { + return array( + array('EN'), + array('foobar'), + ); + } + + public function testValidateUsingCountrySpecificLocale() + { + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('fr_FR'); + $existingLanguage = 'en'; + + $this->validator->validate($existingLanguage, new Language(array( + 'message' => 'aMessage', + ))); + + $this->assertNoViolation(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LengthValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LengthValidatorTest.php new file mode 100644 index 0000000..cd50181 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LengthValidatorTest.php @@ -0,0 +1,252 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Constraints\LengthValidator; +use Symfony\Component\Validator\Validation; + +class LengthValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new LengthValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Length(6)); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Length(6)); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Length(5)); + } + + public function getThreeOrLessCharacters() + { + return array( + array(12), + array('12'), + array('üü'), + array('éé'), + array(123), + array('123'), + array('üüü'), + array('ééé'), + ); + } + + public function getFourCharacters() + { + return array( + array(1234), + array('1234'), + array('üüüü'), + array('éééé'), + ); + } + + public function getFiveOrMoreCharacters() + { + return array( + array(12345), + array('12345'), + array('üüüüü'), + array('ééééé'), + array(123456), + array('123456'), + array('üüüüüü'), + array('éééééé'), + ); + } + + public function getOneCharset() + { + return array( + array('é', 'utf8', true), + array("\xE9", 'CP1252', true), + array("\xE9", 'XXX', false), + array("\xE9", 'utf8', false), + ); + } + + /** + * @dataProvider getFiveOrMoreCharacters + */ + public function testValidValuesMin($value) + { + $constraint = new Length(array('min' => 5)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getThreeOrLessCharacters + */ + public function testValidValuesMax($value) + { + $constraint = new Length(array('max' => 3)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getFourCharacters + */ + public function testValidValuesExact($value) + { + $constraint = new Length(4); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getThreeOrLessCharacters + */ + public function testInvalidValuesMin($value) + { + $constraint = new Length(array( + 'min' => 4, + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_SHORT_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getFiveOrMoreCharacters + */ + public function testInvalidValuesMax($value) + { + $constraint = new Length(array( + 'max' => 4, + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_LONG_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getThreeOrLessCharacters + */ + public function testInvalidValuesExactLessThanFour($value) + { + $constraint = new Length(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_SHORT_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getFiveOrMoreCharacters + */ + public function testInvalidValuesExactMoreThanFour($value) + { + $constraint = new Length(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_LONG_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getOneCharset + */ + public function testOneCharset($value, $charset, $isValid) + { + $constraint = new Length(array( + 'min' => 1, + 'max' => 1, + 'charset' => $charset, + 'charsetMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + if ($isValid) { + $this->assertNoViolation(); + } else { + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ charset }}', $charset) + ->setInvalidValue($value) + ->setCode(Length::INVALID_CHARACTERS_ERROR) + ->assertRaised(); + } + } + + public function testConstraintGetDefaultOption() + { + $constraint = new Length(5); + + $this->assertEquals(5, $constraint->min); + $this->assertEquals(5, $constraint->max); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanOrEqualValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanOrEqualValidatorTest.php new file mode 100644 index 0000000..84f150b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanOrEqualValidatorTest.php @@ -0,0 +1,79 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\LessThanOrEqual; +use Symfony\Component\Validator\Constraints\LessThanOrEqualValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Daniel Holmes <daniel@danielholmes.org> + */ +class LessThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new LessThanOrEqualValidator(); + } + + protected function createConstraint(array $options = null) + { + return new LessThanOrEqual($options); + } + + protected function getErrorCode() + { + return LessThanOrEqual::TOO_HIGH_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array(1, 1), + array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2000-01-01'), new \DateTime('2020-01-01')), + array(new \DateTime('2000-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01'), '2020-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), + array(new \DateTime('2000-01-01 UTC'), '2020-01-01 UTC'), + array(new ComparisonTest_Class(4), new ComparisonTest_Class(5)), + array(new ComparisonTest_Class(5), new ComparisonTest_Class(5)), + array('a', 'a'), + array('a', 'z'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(2, '2', 1, '1', 'integer'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(4), '4', __NAMESPACE__.'\ComparisonTest_Class'), + array('c', '"c"', 'b', '"b"', 'string'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanValidatorTest.php new file mode 100644 index 0000000..da2885f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanValidatorTest.php @@ -0,0 +1,78 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\LessThan; +use Symfony\Component\Validator\Constraints\LessThanValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Daniel Holmes <daniel@danielholmes.org> + */ +class LessThanValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new LessThanValidator(); + } + + protected function createConstraint(array $options = null) + { + return new LessThan($options); + } + + protected function getErrorCode() + { + return LessThan::TOO_HIGH_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array(new \DateTime('2000-01-01'), new \DateTime('2010-01-01')), + array(new \DateTime('2000-01-01'), '2010-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2010-01-01 UTC'), + array(new ComparisonTest_Class(4), new ComparisonTest_Class(5)), + array('22', '333'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(3, '3', 2, '2', 'integer'), + array(2, '2', 2, '2', 'integer'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array(new ComparisonTest_Class(6), '6', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array('333', '"333"', '22', '"22"', 'string'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LocaleValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LocaleValidatorTest.php new file mode 100644 index 0000000..c028596 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LocaleValidatorTest.php @@ -0,0 +1,98 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Locale; +use Symfony\Component\Validator\Constraints\LocaleValidator; +use Symfony\Component\Validator\Validation; + +class LocaleValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new LocaleValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Locale()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Locale()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Locale()); + } + + /** + * @dataProvider getValidLocales + */ + public function testValidLocales($locale) + { + $this->validator->validate($locale, new Locale()); + + $this->assertNoViolation(); + } + + public function getValidLocales() + { + return array( + array('en'), + array('en_US'), + array('pt'), + array('pt_PT'), + array('zh_Hans'), + array('fil_PH'), + ); + } + + /** + * @dataProvider getInvalidLocales + */ + public function testInvalidLocales($locale) + { + $constraint = new Locale(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($locale, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$locale.'"') + ->setCode(Locale::NO_SUCH_LOCALE_ERROR) + ->assertRaised(); + } + + public function getInvalidLocales() + { + return array( + array('EN'), + array('foobar'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LuhnValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LuhnValidatorTest.php new file mode 100644 index 0000000..b0e88c3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LuhnValidatorTest.php @@ -0,0 +1,127 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Luhn; +use Symfony\Component\Validator\Constraints\LuhnValidator; +use Symfony\Component\Validator\Validation; + +class LuhnValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new LuhnValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Luhn()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Luhn()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidNumbers + */ + public function testValidNumbers($number) + { + $this->validator->validate($number, new Luhn()); + + $this->assertNoViolation(); + } + + public function getValidNumbers() + { + return array( + array('42424242424242424242'), + array('378282246310005'), + array('371449635398431'), + array('378734493671000'), + array('5610591081018250'), + array('30569309025904'), + array('38520000023237'), + array('6011111111111117'), + array('6011000990139424'), + array('3530111333300000'), + array('3566002020360505'), + array('5555555555554444'), + array('5105105105105100'), + array('4111111111111111'), + array('4012888888881881'), + array('4222222222222'), + array('5019717010103742'), + array('6331101999990016'), + ); + } + + /** + * @dataProvider getInvalidNumbers + */ + public function testInvalidNumbers($number, $code) + { + $constraint = new Luhn(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($number, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$number.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidNumbers() + { + return array( + array('1234567812345678', Luhn::CHECKSUM_FAILED_ERROR), + array('4222222222222222', Luhn::CHECKSUM_FAILED_ERROR), + array('0000000000000000', Luhn::CHECKSUM_FAILED_ERROR), + array('000000!000000000', Luhn::INVALID_CHARACTERS_ERROR), + array('42-22222222222222', Luhn::INVALID_CHARACTERS_ERROR), + ); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + * @dataProvider getInvalidTypes + */ + public function testInvalidTypes($number) + { + $constraint = new Luhn(); + + $this->validator->validate($number, $constraint); + } + + public function getInvalidTypes() + { + return array( + array(0), + array(123), + array(42424242424242424242), + array(378282246310005), + array(371449635398431), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotBlankValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotBlankValidatorTest.php new file mode 100644 index 0000000..c7c081a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotBlankValidatorTest.php @@ -0,0 +1,106 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\NotBlankValidator; +use Symfony\Component\Validator\Validation; + +class NotBlankValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new NotBlankValidator(); + } + + /** + * @dataProvider getValidValues + */ + public function testValidValues($value) + { + $this->validator->validate($value, new NotBlank()); + + $this->assertNoViolation(); + } + + public function getValidValues() + { + return array( + array('foobar'), + array(0), + array(0.0), + array('0'), + array(1234), + ); + } + + public function testNullIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'null') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } + + public function testBlankIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate('', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '""') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } + + public function testFalseIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(false, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'false') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } + + public function testEmptyArrayIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(array(), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'array') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotEqualToValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotEqualToValidatorTest.php new file mode 100644 index 0000000..a797762 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotEqualToValidatorTest.php @@ -0,0 +1,74 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\NotEqualTo; +use Symfony\Component\Validator\Constraints\NotEqualToValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Daniel Holmes <daniel@danielholmes.org> + */ +class NotEqualToValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new NotEqualToValidator(); + } + + protected function createConstraint(array $options = null) + { + return new NotEqualTo($options); + } + + protected function getErrorCode() + { + return NotEqualTo::IS_EQUAL_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array('22', '333'), + array(new \DateTime('2001-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2001-01-01'), '2000-01-01'), + array(new \DateTime('2001-01-01 UTC'), '2000-01-01 UTC'), + array(new ComparisonTest_Class(6), new ComparisonTest_Class(5)), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(3, '3', 3, '3', 'integer'), + array('2', '"2"', 2, '2', 'integer'), + array('a', '"a"', 'a', '"a"', 'string'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotIdenticalToValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotIdenticalToValidatorTest.php new file mode 100644 index 0000000..16f518f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotIdenticalToValidatorTest.php @@ -0,0 +1,92 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\NotIdenticalTo; +use Symfony\Component\Validator\Constraints\NotIdenticalToValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Daniel Holmes <daniel@danielholmes.org> + */ +class NotIdenticalToValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new NotIdenticalToValidator(); + } + + protected function createConstraint(array $options = null) + { + return new NotIdenticalTo($options); + } + + protected function getErrorCode() + { + return NotIdenticalTo::IS_IDENTICAL_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array('2', 2), + array('22', '333'), + array(new \DateTime('2001-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2001-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01'), '2000-01-01'), + array(new \DateTime('2001-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), + array(null, 1), + ); + } + + public function provideAllInvalidComparisons() + { + $this->setDefaultTimezone('UTC'); + + // Don't call addPhp5Dot5Comparisons() automatically, as it does + // not take care of identical objects + $comparisons = $this->provideInvalidComparisons(); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + $date = new \DateTime('2000-01-01'); + $object = new ComparisonTest_Class(2); + + $comparisons = array( + array(3, '3', 3, '3', 'integer'), + array('a', '"a"', 'a', '"a"', 'string'), + array($date, 'Jan 1, 2000, 12:00 AM', $date, 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array($object, '2', $object, '2', __NAMESPACE__.'\ComparisonTest_Class'), + ); + + return $comparisons; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotNullValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotNullValidatorTest.php new file mode 100644 index 0000000..a244f63 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotNullValidatorTest.php @@ -0,0 +1,63 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\NotNullValidator; +use Symfony\Component\Validator\Validation; + +class NotNullValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new NotNullValidator(); + } + + /** + * @dataProvider getValidValues + */ + public function testValidValues($value) + { + $this->validator->validate($value, new NotNull()); + + $this->assertNoViolation(); + } + + public function getValidValues() + { + return array( + array(0), + array(false), + array(true), + array(''), + ); + } + + public function testNullIsInvalid() + { + $constraint = new NotNull(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'null') + ->setCode(NotNull::IS_NULL_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/RangeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RangeValidatorTest.php new file mode 100644 index 0000000..1093fa4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RangeValidatorTest.php @@ -0,0 +1,403 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\RangeValidator; +use Symfony\Component\Validator\Validation; + +class RangeValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new RangeValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Range(array('min' => 10, 'max' => 20))); + + $this->assertNoViolation(); + } + + public function getTenToTwenty() + { + return array( + array(10.00001), + array(19.99999), + array('10.00001'), + array('19.99999'), + array(10), + array(20), + array(10.0), + array(20.0), + ); + } + + public function getLessThanTen() + { + return array( + array(9.99999, '9.99999'), + array('9.99999', '"9.99999"'), + array(5, '5'), + array(1.0, '1.0'), + ); + } + + public function getMoreThanTwenty() + { + return array( + array(20.000001, '20.000001'), + array('20.000001', '"20.000001"'), + array(21, '21'), + array(30.0, '30.0'), + ); + } + + /** + * @dataProvider getTenToTwenty + */ + public function testValidValuesMin($value) + { + $constraint = new Range(array('min' => 10)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getTenToTwenty + */ + public function testValidValuesMax($value) + { + $constraint = new Range(array('max' => 20)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getTenToTwenty + */ + public function testValidValuesMinMax($value) + { + $constraint = new Range(array('min' => 10, 'max' => 20)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getLessThanTen + */ + public function testInvalidValuesMin($value, $formattedValue) + { + $constraint = new Range(array( + 'min' => 10, + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 10) + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getMoreThanTwenty + */ + public function testInvalidValuesMax($value, $formattedValue) + { + $constraint = new Range(array( + 'max' => 20, + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 20) + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getMoreThanTwenty + */ + public function testInvalidValuesCombinedMax($value, $formattedValue) + { + $constraint = new Range(array( + 'min' => 10, + 'max' => 20, + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMaxMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 20) + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getLessThanTen + */ + public function testInvalidValuesCombinedMin($value, $formattedValue) + { + $constraint = new Range(array( + 'min' => 10, + 'max' => 20, + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMinMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 10) + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + public function getTenthToTwentiethMarch2014() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $tests = array( + array(new \DateTime('March 10, 2014')), + array(new \DateTime('March 15, 2014')), + array(new \DateTime('March 20, 2014')), + ); + + if (\PHP_VERSION_ID >= 50500) { + $tests[] = array(new \DateTimeImmutable('March 10, 2014')); + $tests[] = array(new \DateTimeImmutable('March 15, 2014')); + $tests[] = array(new \DateTimeImmutable('March 20, 2014')); + } + + $this->restoreDefaultTimezone(); + + return $tests; + } + + public function getSoonerThanTenthMarch2014() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $tests = array( + array(new \DateTime('March 20, 2013'), 'Mar 20, 2013, 12:00 AM'), + array(new \DateTime('March 9, 2014'), 'Mar 9, 2014, 12:00 AM'), + ); + + if (\PHP_VERSION_ID >= 50500) { + $tests[] = array(new \DateTimeImmutable('March 20, 2013'), 'Mar 20, 2013, 12:00 AM'); + $tests[] = array(new \DateTimeImmutable('March 9, 2014'), 'Mar 9, 2014, 12:00 AM'); + } + + $this->restoreDefaultTimezone(); + + return $tests; + } + + public function getLaterThanTwentiethMarch2014() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $tests = array( + array(new \DateTime('March 21, 2014'), 'Mar 21, 2014, 12:00 AM'), + array(new \DateTime('March 9, 2015'), 'Mar 9, 2015, 12:00 AM'), + ); + + if (\PHP_VERSION_ID >= 50500) { + $tests[] = array(new \DateTimeImmutable('March 21, 2014'), 'Mar 21, 2014, 12:00 AM'); + $tests[] = array(new \DateTimeImmutable('March 9, 2015'), 'Mar 9, 2015, 12:00 AM'); + } + + $this->restoreDefaultTimezone(); + + return $tests; + } + + /** + * @dataProvider getTenthToTwentiethMarch2014 + */ + public function testValidDatesMin($value) + { + $constraint = new Range(array('min' => 'March 10, 2014')); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getTenthToTwentiethMarch2014 + */ + public function testValidDatesMax($value) + { + $constraint = new Range(array('max' => 'March 20, 2014')); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getTenthToTwentiethMarch2014 + */ + public function testValidDatesMinMax($value) + { + $constraint = new Range(array('min' => 'March 10, 2014', 'max' => 'March 20, 2014')); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getSoonerThanTenthMarch2014 + */ + public function testInvalidDatesMin($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'min' => 'March 10, 2014', + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 10, 2014, 12:00 AM') + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getLaterThanTwentiethMarch2014 + */ + public function testInvalidDatesMax($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'max' => 'March 20, 2014', + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 20, 2014, 12:00 AM') + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getLaterThanTwentiethMarch2014 + */ + public function testInvalidDatesCombinedMax($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'min' => 'March 10, 2014', + 'max' => 'March 20, 2014', + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMaxMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 20, 2014, 12:00 AM') + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getSoonerThanTenthMarch2014 + */ + public function testInvalidDatesCombinedMin($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'min' => 'March 10, 2014', + 'max' => 'March 20, 2014', + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMinMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 10, 2014, 12:00 AM') + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array(9.999999), + array(20.000001), + array('9.999999'), + array('20.000001'), + array(new \stdClass()), + ); + } + + public function testNonNumeric() + { + $this->validator->validate('abcd', new Range(array( + 'min' => 10, + 'max' => 20, + 'invalidMessage' => 'myMessage', + ))); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"abcd"') + ->setCode(Range::INVALID_CHARACTERS_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexTest.php new file mode 100644 index 0000000..26ef1b2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexTest.php @@ -0,0 +1,88 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Regex; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class RegexTest extends TestCase +{ + public function testConstraintGetDefaultOption() + { + $constraint = new Regex('/^[0-9]+$/'); + + $this->assertSame('/^[0-9]+$/', $constraint->pattern); + } + + public function provideHtmlPatterns() + { + return array( + // HTML5 wraps the pattern in ^(?:pattern)$ + array('/^[0-9]+$/', '[0-9]+'), + array('/[0-9]+$/', '.*[0-9]+'), + array('/^[0-9]+/', '[0-9]+.*'), + array('/[0-9]+/', '.*[0-9]+.*'), + // We need a smart way to allow matching of patterns that contain + // ^ and $ at various sub-clauses of an or-clause + // .*(pattern).* seems to work correctly + array('/[0-9]$|[a-z]+/', '.*([0-9]$|[a-z]+).*'), + array('/[0-9]$|^[a-z]+/', '.*([0-9]$|^[a-z]+).*'), + array('/^[0-9]|[a-z]+$/', '.*(^[0-9]|[a-z]+$).*'), + // Unescape escaped delimiters + array('/^[0-9]+\/$/', '[0-9]+/'), + array('#^[0-9]+\#$#', '[0-9]+#'), + // Cannot be converted + array('/^[0-9]+$/i', null), + + // Inverse matches are simple, just wrap in + // ((?!pattern).)* + array('/^[0-9]+$/', '((?!^[0-9]+$).)*', false), + array('/[0-9]+$/', '((?![0-9]+$).)*', false), + array('/^[0-9]+/', '((?!^[0-9]+).)*', false), + array('/[0-9]+/', '((?![0-9]+).)*', false), + array('/[0-9]$|[a-z]+/', '((?![0-9]$|[a-z]+).)*', false), + array('/[0-9]$|^[a-z]+/', '((?![0-9]$|^[a-z]+).)*', false), + array('/^[0-9]|[a-z]+$/', '((?!^[0-9]|[a-z]+$).)*', false), + array('/^[0-9]+\/$/', '((?!^[0-9]+/$).)*', false), + array('#^[0-9]+\#$#', '((?!^[0-9]+#$).)*', false), + array('/^[0-9]+$/i', null, false), + ); + } + + /** + * @dataProvider provideHtmlPatterns + */ + public function testGetHtmlPattern($pattern, $htmlPattern, $match = true) + { + $constraint = new Regex(array( + 'pattern' => $pattern, + 'match' => $match, + )); + + $this->assertSame($pattern, $constraint->pattern); + $this->assertSame($htmlPattern, $constraint->getHtmlPattern()); + } + + public function testGetCustomHtmlPattern() + { + $constraint = new Regex(array( + 'pattern' => '((?![0-9]$|[a-z]+).)*', + 'htmlPattern' => 'foobar', + )); + + $this->assertSame('((?![0-9]$|[a-z]+).)*', $constraint->pattern); + $this->assertSame('foobar', $constraint->getHtmlPattern()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexValidatorTest.php new file mode 100644 index 0000000..88e6996 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexValidatorTest.php @@ -0,0 +1,98 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Regex; +use Symfony\Component\Validator\Constraints\RegexValidator; +use Symfony\Component\Validator\Validation; + +class RegexValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new RegexValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Regex(array('pattern' => '/^[0-9]+$/'))); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Regex(array('pattern' => '/^[0-9]+$/'))); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Regex(array('pattern' => '/^[0-9]+$/'))); + } + + /** + * @dataProvider getValidValues + */ + public function testValidValues($value) + { + $constraint = new Regex(array('pattern' => '/^[0-9]+$/')); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + public function getValidValues() + { + return array( + array(0), + array('0'), + array('090909'), + array(90909), + ); + } + + /** + * @dataProvider getInvalidValues + */ + public function testInvalidValues($value) + { + $constraint = new Regex(array( + 'pattern' => '/^[0-9]+$/', + 'message' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setCode(Regex::REGEX_FAILED_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array('abcd'), + array('090foo'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/TimeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/TimeValidatorTest.php new file mode 100644 index 0000000..a6ca143 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/TimeValidatorTest.php @@ -0,0 +1,107 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Time; +use Symfony\Component\Validator\Constraints\TimeValidator; +use Symfony\Component\Validator\Validation; + +class TimeValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new TimeValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Time()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Time()); + + $this->assertNoViolation(); + } + + public function testDateTimeClassIsValid() + { + $this->validator->validate(new \DateTime(), new Time()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Time()); + } + + /** + * @dataProvider getValidTimes + */ + public function testValidTimes($time) + { + $this->validator->validate($time, new Time()); + + $this->assertNoViolation(); + } + + public function getValidTimes() + { + return array( + array('01:02:03'), + array('00:00:00'), + array('23:59:59'), + ); + } + + /** + * @dataProvider getInvalidTimes + */ + public function testInvalidTimes($time, $code) + { + $constraint = new Time(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($time, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$time.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidTimes() + { + return array( + array('foobar', Time::INVALID_FORMAT_ERROR), + array('foobar 12:34:56', Time::INVALID_FORMAT_ERROR), + array('12:34:56 foobar', Time::INVALID_FORMAT_ERROR), + array('00:00', Time::INVALID_FORMAT_ERROR), + array('24:00:00', Time::INVALID_TIME_ERROR), + array('00:60:00', Time::INVALID_TIME_ERROR), + array('00:00:60', Time::INVALID_TIME_ERROR), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/TypeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/TypeValidatorTest.php new file mode 100644 index 0000000..51bd992 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/TypeValidatorTest.php @@ -0,0 +1,187 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Type; +use Symfony\Component\Validator\Constraints\TypeValidator; +use Symfony\Component\Validator\Validation; + +class TypeValidatorTest extends AbstractConstraintValidatorTest +{ + protected static $file; + + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new TypeValidator(); + } + + public function testNullIsValid() + { + $constraint = new Type(array('type' => 'integer')); + + $this->validator->validate(null, $constraint); + + $this->assertNoViolation(); + } + + public function testEmptyIsValidIfString() + { + $constraint = new Type(array('type' => 'string')); + + $this->validator->validate('', $constraint); + + $this->assertNoViolation(); + } + + public function testEmptyIsInvalidIfNoString() + { + $constraint = new Type(array( + 'type' => 'integer', + 'message' => 'myMessage', + )); + + $this->validator->validate('', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '""') + ->setParameter('{{ type }}', 'integer') + ->setCode(Type::INVALID_TYPE_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getValidValues + */ + public function testValidValues($value, $type) + { + $constraint = new Type(array('type' => $type)); + + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + public function getValidValues() + { + $object = new \stdClass(); + $file = $this->createFile(); + + return array( + array(true, 'Boolean'), + array(false, 'Boolean'), + array(true, 'boolean'), + array(false, 'boolean'), + array(true, 'bool'), + array(false, 'bool'), + array(0, 'numeric'), + array('0', 'numeric'), + array(1.5, 'numeric'), + array('1.5', 'numeric'), + array(0, 'integer'), + array(1.5, 'float'), + array('12345', 'string'), + array(array(), 'array'), + array($object, 'object'), + array($object, 'stdClass'), + array($file, 'resource'), + array('12345', 'digit'), + array('12a34', 'alnum'), + array('abcde', 'alpha'), + array("\n\r\t", 'cntrl'), + array('arf12', 'graph'), + array('abcde', 'lower'), + array('ABCDE', 'upper'), + array('arf12', 'print'), + array('*&$()', 'punct'), + array("\n\r\t", 'space'), + array('AB10BC99', 'xdigit'), + ); + } + + /** + * @dataProvider getInvalidValues + */ + public function testInvalidValues($value, $type, $valueAsString) + { + $constraint = new Type(array( + 'type' => $type, + 'message' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $valueAsString) + ->setParameter('{{ type }}', $type) + ->setCode(Type::INVALID_TYPE_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + $object = new \stdClass(); + $file = $this->createFile(); + + return array( + array('foobar', 'numeric', '"foobar"'), + array('foobar', 'boolean', '"foobar"'), + array('0', 'integer', '"0"'), + array('1.5', 'float', '"1.5"'), + array(12345, 'string', '12345'), + array($object, 'boolean', 'object'), + array($object, 'numeric', 'object'), + array($object, 'integer', 'object'), + array($object, 'float', 'object'), + array($object, 'string', 'object'), + array($object, 'resource', 'object'), + array($file, 'boolean', 'resource'), + array($file, 'numeric', 'resource'), + array($file, 'integer', 'resource'), + array($file, 'float', 'resource'), + array($file, 'string', 'resource'), + array($file, 'object', 'resource'), + array('12a34', 'digit', '"12a34"'), + array('1a#23', 'alnum', '"1a#23"'), + array('abcd1', 'alpha', '"abcd1"'), + array("\nabc", 'cntrl', "\"\nabc\""), + array("abc\n", 'graph', "\"abc\n\""), + array('abCDE', 'lower', '"abCDE"'), + array('ABcde', 'upper', '"ABcde"'), + array("\nabc", 'print', "\"\nabc\""), + array('abc&$!', 'punct', '"abc&$!"'), + array("\nabc", 'space', "\"\nabc\""), + array('AR1012', 'xdigit', '"AR1012"'), + ); + } + + protected function createFile() + { + if (!static::$file) { + static::$file = fopen(__FILE__, 'r'); + } + + return static::$file; + } + + public static function tearDownAfterClass() + { + if (static::$file) { + fclose(static::$file); + static::$file = null; + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/UrlValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/UrlValidatorTest.php new file mode 100644 index 0000000..bc3bd02 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/UrlValidatorTest.php @@ -0,0 +1,242 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Bridge\PhpUnit\DnsMock; +use Symfony\Component\Validator\Constraints\Url; +use Symfony\Component\Validator\Constraints\UrlValidator; +use Symfony\Component\Validator\Validation; + +/** + * @group dns-sensitive + */ +class UrlValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new UrlValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Url()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Url()); + + $this->assertNoViolation(); + } + + public function testEmptyStringFromObjectIsValid() + { + $this->validator->validate(new EmailProvider(), new Url()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Url()); + } + + /** + * @dataProvider getValidUrls + */ + public function testValidUrls($url) + { + $this->validator->validate($url, new Url()); + + $this->assertNoViolation(); + } + + public function getValidUrls() + { + return array( + array('http://a.pl'), + array('http://www.google.com'), + array('http://www.google.com.'), + array('http://www.google.museum'), + array('https://google.com/'), + array('https://google.com:80/'), + array('http://www.example.coop/'), + array('http://www.test-example.com/'), + array('http://www.symfony.com/'), + array('http://symfony.fake/blog/'), + array('http://symfony.com/?'), + array('http://symfony.com/search?type=&q=url+validator'), + array('http://symfony.com/#'), + array('http://symfony.com/#?'), + array('http://www.symfony.com/doc/current/book/validation.html#supported-constraints'), + array('http://very.long.domain.name.com/'), + array('http://localhost/'), + array('http://myhost123/'), + array('http://127.0.0.1/'), + array('http://127.0.0.1:80/'), + array('http://[::1]/'), + array('http://[::1]:80/'), + array('http://[1:2:3::4:5:6:7]/'), + array('http://sãopaulo.com/'), + array('http://xn--sopaulo-xwa.com/'), + array('http://sãopaulo.com.br/'), + array('http://xn--sopaulo-xwa.com.br/'), + array('http://пример.испытание/'), + array('http://xn--e1afmkfd.xn--80akhbyknj4f/'), + array('http://مثال.إختبار/'), + array('http://xn--mgbh0fb.xn--kgbechtv/'), + array('http://例子.测试/'), + array('http://xn--fsqu00a.xn--0zwm56d/'), + array('http://例子.測試/'), + array('http://xn--fsqu00a.xn--g6w251d/'), + array('http://例え.テスト/'), + array('http://xn--r8jz45g.xn--zckzah/'), + array('http://مثال.آزمایشی/'), + array('http://xn--mgbh0fb.xn--hgbk6aj7f53bba/'), + array('http://실례.테스트/'), + array('http://xn--9n2bp8q.xn--9t4b11yi5a/'), + array('http://العربية.idn.icann.org/'), + array('http://xn--ogb.idn.icann.org/'), + array('http://xn--e1afmkfd.xn--80akhbyknj4f.xn--e1afmkfd/'), + array('http://xn--espaa-rta.xn--ca-ol-fsay5a/'), + array('http://xn--d1abbgf6aiiy.xn--p1ai/'), + array('http://☎.com/'), + array('http://username:password@symfony.com'), + array('http://user.name:password@symfony.com'), + array('http://username:pass.word@symfony.com'), + array('http://user.name:pass.word@symfony.com'), + array('http://user-name@symfony.com'), + array('http://symfony.com?'), + array('http://symfony.com?query=1'), + array('http://symfony.com/?query=1'), + array('http://symfony.com#'), + array('http://symfony.com#fragment'), + array('http://symfony.com/#fragment'), + array('http://symfony.com/#one_more%20test'), + ); + } + + /** + * @dataProvider getInvalidUrls + */ + public function testInvalidUrls($url) + { + $constraint = new Url(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($url, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$url.'"') + ->setCode(Url::INVALID_URL_ERROR) + ->assertRaised(); + } + + public function getInvalidUrls() + { + return array( + array('google.com'), + array('://google.com'), + array('http ://google.com'), + array('http:/google.com'), + array('http://goog_le.com'), + array('http://google.com::aa'), + array('http://google.com:aa'), + array('ftp://google.fr'), + array('faked://google.fr'), + array('http://127.0.0.1:aa/'), + array('ftp://[::1]/'), + array('http://[::1'), + array('http://hello.☎/'), + array('http://:password@symfony.com'), + array('http://:password@@symfony.com'), + array('http://username:passwordsymfony.com'), + array('http://usern@me:password@symfony.com'), + array('http://example.com/exploit.html?<script>alert(1);</script>'), + array('http://example.com/exploit.html?hel lo'), + array('http://example.com/exploit.html?not_a%hex'), + array('http://'), + ); + } + + /** + * @dataProvider getValidCustomUrls + */ + public function testCustomProtocolIsValid($url) + { + $constraint = new Url(array( + 'protocols' => array('ftp', 'file', 'git'), + )); + + $this->validator->validate($url, $constraint); + + $this->assertNoViolation(); + } + + public function getValidCustomUrls() + { + return array( + array('ftp://google.com'), + array('file://127.0.0.1'), + array('git://[::1]/'), + ); + } + + /** + * @dataProvider getCheckDns + * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts + */ + public function testCheckDns($violation) + { + DnsMock::withMockedHosts(array('example.com' => array(array('type' => $violation ? '' : 'A')))); + + $constraint = new Url(array( + 'checkDNS' => true, + 'dnsMessage' => 'myMessage', + )); + + $this->validator->validate('http://example.com', $constraint); + + if (!$violation) { + $this->assertNoViolation(); + } else { + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"example.com"') + ->setCode(Url::INVALID_URL_ERROR) + ->assertRaised(); + } + } + + public function getCheckDns() + { + return array(array(true), array(false)); + } +} + +class EmailProvider +{ + public function __toString() + { + return ''; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/UuidValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/UuidValidatorTest.php new file mode 100644 index 0000000..05a6068 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/UuidValidatorTest.php @@ -0,0 +1,221 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Uuid; +use Symfony\Component\Validator\Constraints\UuidValidator; +use Symfony\Component\Validator\Validation; + +/** + * @author Colin O'Dell <colinodell@gmail.com> + */ +class UuidValidatorTest extends AbstractConstraintValidatorTest +{ + protected function getApiVersion() + { + return Validation::API_VERSION_2_5; + } + + protected function createValidator() + { + return new UuidValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Uuid()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Uuid()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsUuidConstraintCompatibleType() + { + $constraint = $this->getMockForAbstractClass('Symfony\\Component\\Validator\\Constraint'); + + $this->validator->validate('216fff40-98d9-11e3-a5e2-0800200c9a66', $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Uuid()); + } + + /** + * @dataProvider getValidStrictUuids + */ + public function testValidStrictUuids($uuid, $versions = null) + { + $constraint = new Uuid(); + + if (null !== $versions) { + $constraint->versions = $versions; + } + + $this->validator->validate($uuid, $constraint); + + $this->assertNoViolation(); + } + + public function getValidStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2-0800200c9a66'), // Version 1 UUID in lowercase + array('216fff40-98d9-11e3-a5e2-0800200c9a66', array(Uuid::V1_MAC)), + array('216FFF40-98D9-11E3-A5E2-0800200C9A66'), // Version 1 UUID in UPPERCASE + array('456daefb-5aa6-41b5-8dbc-068b05a8b201'), // Version 4 UUID in lowercase + array('456daEFb-5AA6-41B5-8DBC-068B05A8B201'), // Version 4 UUID in mixed case + array('456daEFb-5AA6-41B5-8DBC-068B05A8B201', array(Uuid::V4_RANDOM)), + ); + } + + /** + * @dataProvider getInvalidStrictUuids + */ + public function testInvalidStrictUuids($uuid, $code, $versions = null) + { + $constraint = new Uuid(array( + 'message' => 'testMessage', + )); + + if (null !== $versions) { + $constraint->versions = $versions; + } + + $this->validator->validate($uuid, $constraint); + + $this->buildViolation('testMessage') + ->setParameter('{{ value }}', '"'.$uuid.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216f-ff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800-200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c-9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff4098d911e3a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR), + array('216fff40-98d9-01e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-61e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-71e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-81e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-91e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-a1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-b1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-c1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-d1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-e1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-f1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, array(Uuid::V2_DCE, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1)), + array('216fff40-98d9-21e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, array(Uuid::V1_MAC, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1)), + array('216fff40-98d9-11e3-05e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-15e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-25e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-35e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-45e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-55e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-65e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-75e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-c5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-d5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-e5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-f5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + + // Non-standard UUID allowed by some other systems + array('{216fff40-98d9-11e3-a5e2-0800200c9a66}', Uuid::INVALID_CHARACTERS_ERROR), + array('[216fff40-98d9-11e3-a5e2-0800200c9a66]', Uuid::INVALID_CHARACTERS_ERROR), + ); + } + + /** + * @dataProvider getValidNonStrictUuids + */ + public function testValidNonStrictUuids($uuid) + { + $constraint = new Uuid(array( + 'strict' => false, + )); + + $this->validator->validate($uuid, $constraint); + + $this->assertNoViolation(); + } + + public function getValidNonStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2-0800200c9a66'), // Version 1 UUID in lowercase + array('216FFF40-98D9-11E3-A5E2-0800200C9A66'), // Version 1 UUID in UPPERCASE + array('456daefb-5aa6-41b5-8dbc-068b05a8b201'), // Version 4 UUID in lowercase + array('456DAEFb-5AA6-41B5-8DBC-068b05a8B201'), // Version 4 UUID in mixed case + + // Non-standard UUIDs allowed by some other systems + array('216f-ff40-98d9-11e3-a5e2-0800-200c-9a66'), // Non-standard dash positions (every 4 chars) + array('216fff40-98d911e3-a5e20800-200c9a66'), // Non-standard dash positions (every 8 chars) + array('216fff4098d911e3a5e20800200c9a66'), // No dashes at all + array('{216fff40-98d9-11e3-a5e2-0800200c9a66}'), // Wrapped with curly braces + array('[216fff40-98d9-11e3-a5e2-0800200c9a66]'), // Wrapped with squared braces + ); + } + + /** + * @dataProvider getInvalidNonStrictUuids + */ + public function testInvalidNonStrictUuids($uuid, $code) + { + $constraint = new Uuid(array( + 'strict' => false, + 'message' => 'myMessage', + )); + + $this->validator->validate($uuid, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$uuid.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidNonStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216fff40-98d9-11e3-a5e2_0800200c9a6', Uuid::INVALID_CHARACTERS_ERROR), + array('216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/ValidTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ValidTest.php new file mode 100644 index 0000000..83722fd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ValidTest.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class ValidTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectGroupsOption() + { + new Valid(array('groups' => 'foo')); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CallbackClass.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CallbackClass.php new file mode 100644 index 0000000..0f6a2f4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CallbackClass.php @@ -0,0 +1,24 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\ExecutionContextInterface; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class CallbackClass +{ + public static function callback($object, ExecutionContextInterface $context) + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ClassConstraint.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ClassConstraint.php new file mode 100644 index 0000000..a4dc777 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ClassConstraint.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class ClassConstraint extends Constraint +{ + public function getTargets() + { + return self::CLASS_CONSTRAINT; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintA.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintA.php new file mode 100644 index 0000000..8a196dc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintA.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintA extends Constraint +{ + public $property1; + public $property2; + + public function getDefaultOption() + { + return 'property2'; + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintAValidator.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintAValidator.php new file mode 100644 index 0000000..b3b85c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintAValidator.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\ExecutionContextInterface; + +class ConstraintAValidator extends ConstraintValidator +{ + public static $passedContext; + + public function initialize(ExecutionContextInterface $context) + { + parent::initialize($context); + + self::$passedContext = $context; + } + + public function validate($value, Constraint $constraint) + { + if ('VALID' != $value) { + $this->context->addViolation('message', array('param' => 'value')); + + return; + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintB.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintB.php new file mode 100644 index 0000000..6258923 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintB.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintB extends Constraint +{ + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintC.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintC.php new file mode 100644 index 0000000..b0418b8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintC.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintC extends Constraint +{ + public $option1; + + public function getRequiredOptions() + { + return array('option1'); + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValue.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValue.php new file mode 100644 index 0000000..4ebd981 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValue.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintWithValue extends Constraint +{ + public $property; + public $value; + + public function getDefaultOption() + { + return 'property'; + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValueAsDefault.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValueAsDefault.php new file mode 100644 index 0000000..a975e07 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValueAsDefault.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintWithValueAsDefault extends Constraint +{ + public $property; + public $value; + + public function getDefaultOption() + { + return 'value'; + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Countable.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Countable.php new file mode 100644 index 0000000..afc4237 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Countable.php @@ -0,0 +1,27 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class Countable implements \Countable +{ + private $content; + + public function __construct(array $content) + { + $this->content = $content; + } + + public function count() + { + return \count($this->content); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CustomArrayObject.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CustomArrayObject.php new file mode 100644 index 0000000..feb2531 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CustomArrayObject.php @@ -0,0 +1,70 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +/** + * This class is a hand written simplified version of PHP native `ArrayObject` + * class, to show that it behaves differently than the PHP native implementation. + */ +class CustomArrayObject implements \ArrayAccess, \IteratorAggregate, \Countable, \Serializable +{ + private $array; + + public function __construct(array $array = null) + { + $this->array = $array ?: array(); + } + + public function offsetExists($offset) + { + return array_key_exists($offset, $this->array); + } + + public function offsetGet($offset) + { + return $this->array[$offset]; + } + + public function offsetSet($offset, $value) + { + if (null === $offset) { + $this->array[] = $value; + } else { + $this->array[$offset] = $value; + } + } + + public function offsetUnset($offset) + { + unset($this->array[$offset]); + } + + public function getIterator() + { + return new \ArrayIterator($this->array); + } + + public function count() + { + return \count($this->array); + } + + public function serialize() + { + return serialize($this->array); + } + + public function unserialize($serialized) + { + $this->array = (array) unserialize((string) $serialized); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Entity.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Entity.php new file mode 100644 index 0000000..e306191 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Entity.php @@ -0,0 +1,104 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints as Assert; +use Symfony\Component\Validator\ExecutionContextInterface; + +/** + * @Symfony\Component\Validator\Tests\Fixtures\ConstraintA + * @Assert\GroupSequence({"Foo", "Entity"}) + * @Assert\Callback({"Symfony\Component\Validator\Tests\Fixtures\CallbackClass", "callback"}) + */ +class Entity extends EntityParent implements EntityInterfaceB +{ + /** + * @Assert\NotNull + * @Assert\Range(min=3) + * @Assert\All({@Assert\NotNull, @Assert\Range(min=3)}), + * @Assert\All(constraints={@Assert\NotNull, @Assert\Range(min=3)}) + * @Assert\Collection(fields={ + * "foo" = {@Assert\NotNull, @Assert\Range(min=3)}, + * "bar" = @Assert\Range(min=5) + * }) + * @Assert\Choice(choices={"A", "B"}, message="Must be one of %choices%") + */ + public $firstName; + protected $lastName; + public $reference; + public $reference2; + private $internal; + public $data = 'Overridden data'; + public $initialized = false; + + public function __construct($internal = null) + { + $this->internal = $internal; + } + + public function getInternal() + { + return $this->internal.' from getter'; + } + + public function setLastName($lastName) + { + $this->lastName = $lastName; + } + + /** + * @Assert\NotNull + */ + public function getLastName() + { + return $this->lastName; + } + + public function getValid() + { + } + + /** + * @Assert\IsTrue + */ + public function isValid() + { + return 'valid'; + } + + /** + * @Assert\IsTrue + */ + public function hasPermissions() + { + return 'permissions'; + } + + public function getData() + { + return 'Overridden data'; + } + + /** + * @Assert\Callback(payload="foo") + */ + public function validateMe(ExecutionContextInterface $context) + { + } + + /** + * @Assert\Callback + */ + public static function validateMeStatic($object, ExecutionContextInterface $context) + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceA.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceA.php new file mode 100644 index 0000000..a0afcf8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceA.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +interface EntityInterfaceA +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceB.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceB.php new file mode 100644 index 0000000..93b3894 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceB.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +interface EntityInterfaceB extends EntityParentInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParent.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParent.php new file mode 100644 index 0000000..4674f8b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParent.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints\NotNull; + +class EntityParent implements EntityInterfaceA +{ + protected $firstName; + private $internal; + private $data = 'Data'; + + /** + * @NotNull + */ + protected $other; + + public function getData() + { + return 'Data'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParentInterface.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParentInterface.php new file mode 100644 index 0000000..3aad6fe --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParentInterface.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +interface EntityParentInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCar.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCar.php new file mode 100644 index 0000000..0b38487 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCar.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +class EntityStaticCar extends EntityStaticVehicle +{ + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCarTurbo.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCarTurbo.php new file mode 100644 index 0000000..abf1edb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCarTurbo.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +class EntityStaticCarTurbo extends EntityStaticCar +{ + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticVehicle.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticVehicle.php new file mode 100644 index 0000000..9ce7293 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticVehicle.php @@ -0,0 +1,25 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +class EntityStaticVehicle +{ + public $wheels; + + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraint.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraint.php new file mode 100644 index 0000000..03019fc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraint.php @@ -0,0 +1,24 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class FailingConstraint extends Constraint +{ + public $message = 'Failed'; + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraintValidator.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraintValidator.php new file mode 100644 index 0000000..a019dd6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraintValidator.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; + +class FailingConstraintValidator extends ConstraintValidator +{ + public function validate($value, Constraint $constraint) + { + $this->context->addViolation($constraint->message, array()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeClassMetadata.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeClassMetadata.php new file mode 100644 index 0000000..8c76a21 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeClassMetadata.php @@ -0,0 +1,26 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +class FakeClassMetadata extends ClassMetadata +{ + public function addCustomPropertyMetadata($propertyName, $metadata) + { + if (!isset($this->members[$propertyName])) { + $this->members[$propertyName] = array(); + } + + $this->members[$propertyName][] = $metadata; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeMetadataFactory.php new file mode 100644 index 0000000..dbc255f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeMetadataFactory.php @@ -0,0 +1,72 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\MetadataInterface; + +class FakeMetadataFactory implements MetadataFactoryInterface +{ + protected $metadatas = array(); + + public function getMetadataFor($class) + { + $hash = null; + + if (\is_object($class)) { + $hash = spl_object_hash($class); + $class = \get_class($class); + } + + if (!\is_string($class)) { + throw new NoSuchMetadataException(sprintf('No metadata for type %s', \gettype($class))); + } + + if (!isset($this->metadatas[$class])) { + if (isset($this->metadatas[$hash])) { + return $this->metadatas[$hash]; + } + + throw new NoSuchMetadataException(sprintf('No metadata for "%s"', $class)); + } + + return $this->metadatas[$class]; + } + + public function hasMetadataFor($class) + { + $hash = null; + + if (\is_object($class)) { + $hash = spl_object_hash($class); + $class = \get_class($class); + } + + if (!\is_string($class)) { + return false; + } + + return isset($this->metadatas[$class]) || isset($this->metadatas[$hash]); + } + + public function addMetadata($metadata) + { + $this->metadatas[$metadata->getClassName()] = $metadata; + } + + public function addMetadataForValue($value, MetadataInterface $metadata) + { + $key = \is_object($value) ? spl_object_hash($value) : $value; + $this->metadatas[$key] = $metadata; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FilesLoader.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FilesLoader.php new file mode 100644 index 0000000..a4d6a6a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FilesLoader.php @@ -0,0 +1,39 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Mapping\Loader\FilesLoader as BaseFilesLoader; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; + +abstract class FilesLoader extends BaseFilesLoader +{ + protected $timesCalled = 0; + protected $loader; + + public function __construct(array $paths, LoaderInterface $loader) + { + $this->loader = $loader; + parent::__construct($paths); + } + + protected function getFileLoaderInstance($file) + { + ++$this->timesCalled; + + return $this->loader; + } + + public function getTimesCalled() + { + return $this->timesCalled; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderChildEntity.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderChildEntity.php new file mode 100644 index 0000000..be7191f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderChildEntity.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class GroupSequenceProviderChildEntity extends GroupSequenceProviderEntity +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderEntity.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderEntity.php new file mode 100644 index 0000000..2b0beaf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderEntity.php @@ -0,0 +1,36 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints as Assert; +use Symfony\Component\Validator\GroupSequenceProviderInterface; + +/** + * @Assert\GroupSequenceProvider + */ +class GroupSequenceProviderEntity implements GroupSequenceProviderInterface +{ + public $firstName; + public $lastName; + + protected $sequence = array(); + + public function __construct($sequence) + { + $this->sequence = $sequence; + } + + public function getGroupSequence() + { + return $this->sequence; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraint.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraint.php new file mode 100644 index 0000000..6a9eaa7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraint.php @@ -0,0 +1,18 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class InvalidConstraint extends Constraint +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraintValidator.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraintValidator.php new file mode 100644 index 0000000..bd9a5cf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraintValidator.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class InvalidConstraintValidator +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/LegacyClassMetadata.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/LegacyClassMetadata.php new file mode 100644 index 0000000..6a832a1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/LegacyClassMetadata.php @@ -0,0 +1,20 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\ClassBasedInterface; +use Symfony\Component\Validator\MetadataInterface; +use Symfony\Component\Validator\PropertyMetadataContainerInterface; + +interface LegacyClassMetadata extends MetadataInterface, PropertyMetadataContainerInterface, ClassBasedInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/PropertyConstraint.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/PropertyConstraint.php new file mode 100644 index 0000000..fadb535 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/PropertyConstraint.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class PropertyConstraint extends Constraint +{ + public function getTargets() + { + return self::PROPERTY_CONSTRAINT; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Reference.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Reference.php new file mode 100644 index 0000000..af29735 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Reference.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class Reference +{ + public $value; + + private $privateValue; + + public function setPrivateValue($privateValue) + { + $this->privateValue = $privateValue; + } + + public function getPrivateValue() + { + return $this->privateValue; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/StubGlobalExecutionContext.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/StubGlobalExecutionContext.php new file mode 100644 index 0000000..bd2f5c9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/StubGlobalExecutionContext.php @@ -0,0 +1,68 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\ConstraintViolationList; +use Symfony\Component\Validator\GlobalExecutionContextInterface; +use Symfony\Component\Validator\ValidationVisitorInterface; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0 + */ +class StubGlobalExecutionContext implements GlobalExecutionContextInterface +{ + private $violations; + private $root; + private $visitor; + + public function __construct($root = null, ValidationVisitorInterface $visitor = null) + { + $this->violations = new ConstraintViolationList(); + $this->root = $root; + $this->visitor = $visitor; + } + + public function getViolations() + { + return $this->violations; + } + + public function setRoot($root) + { + $this->root = $root; + } + + public function getRoot() + { + return $this->root; + } + + public function setVisitor(ValidationVisitorInterface $visitor) + { + $this->visitor = $visitor; + } + + public function getVisitor() + { + return $this->visitor; + } + + public function getValidatorFactory() + { + } + + public function getMetadataFactory() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ToString.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ToString.php new file mode 100644 index 0000000..714fdb9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ToString.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class ToString +{ + public $data; + + public function __toString() + { + return 'toString'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/LegacyExecutionContextTest.php b/public/system/storage/vendor/symfony/validator/Tests/LegacyExecutionContextTest.php new file mode 100644 index 0000000..1130551 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/LegacyExecutionContextTest.php @@ -0,0 +1,335 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\ConstraintValidatorFactory; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; +use Symfony\Component\Validator\ExecutionContext; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\ValidationVisitor; + +/** + * @group legacy + */ +class LegacyExecutionContextTest extends TestCase +{ + const TRANS_DOMAIN = 'trans_domain'; + + private $visitor; + private $violations; + private $metadata; + private $metadataFactory; + private $globalContext; + private $translator; + + /** + * @var ExecutionContext + */ + private $context; + + protected function setUp() + { + $this->visitor = $this->getMockBuilder('Symfony\Component\Validator\ValidationVisitor') + ->disableOriginalConstructor() + ->getMock(); + $this->violations = new ConstraintViolationList(); + $this->metadata = $this->getMockBuilder('Symfony\Component\Validator\MetadataInterface')->getMock(); + $this->metadataFactory = $this->getMockBuilder('Symfony\Component\Validator\MetadataFactoryInterface')->getMock(); + $this->globalContext = $this->getMockBuilder('Symfony\Component\Validator\GlobalExecutionContextInterface')->getMock(); + $this->globalContext->expects($this->any()) + ->method('getRoot') + ->will($this->returnValue('Root')); + $this->globalContext->expects($this->any()) + ->method('getViolations') + ->will($this->returnValue($this->violations)); + $this->globalContext->expects($this->any()) + ->method('getVisitor') + ->will($this->returnValue($this->visitor)); + $this->globalContext->expects($this->any()) + ->method('getMetadataFactory') + ->will($this->returnValue($this->metadataFactory)); + $this->translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock(); + $this->context = new ExecutionContext($this->globalContext, $this->translator, self::TRANS_DOMAIN, $this->metadata, 'currentValue', 'Group', 'foo.bar'); + } + + protected function tearDown() + { + $this->globalContext = null; + $this->context = null; + } + + public function testInit() + { + $this->assertCount(0, $this->context->getViolations()); + $this->assertSame('Root', $this->context->getRoot()); + $this->assertSame('foo.bar', $this->context->getPropertyPath()); + $this->assertSame('Group', $this->context->getGroup()); + } + + public function testClone() + { + $clone = clone $this->context; + + // Cloning the context keeps the reference to the original violation + // list. This way we can efficiently duplicate context instances during + // the validation run and only modify the properties that need to be + // changed. + $this->assertSame($this->context->getViolations(), $clone->getViolations()); + } + + public function testAddViolation() + { + $this->translator->expects($this->once()) + ->method('trans') + ->with('Error', array('foo' => 'bar')) + ->will($this->returnValue('Translated error')); + + $this->context->addViolation('Error', array('foo' => 'bar'), 'invalid'); + + $this->assertEquals(new ConstraintViolationList(array( + new ConstraintViolation( + 'Translated error', + 'Error', + array('foo' => 'bar'), + 'Root', + 'foo.bar', + 'invalid' + ), + )), $this->context->getViolations()); + } + + public function testAddViolationUsesPreconfiguredValueIfNotPassed() + { + $this->translator->expects($this->once()) + ->method('trans') + ->with('Error', array()) + ->will($this->returnValue('Translated error')); + + $this->context->addViolation('Error'); + + $this->assertEquals(new ConstraintViolationList(array( + new ConstraintViolation( + 'Translated error', + 'Error', + array(), + 'Root', + 'foo.bar', + 'currentValue' + ), + )), $this->context->getViolations()); + } + + public function testAddViolationUsesPassedNullValue() + { + $this->translator->expects($this->once()) + ->method('trans') + ->with('Error', array('foo1' => 'bar1')) + ->will($this->returnValue('Translated error')); + $this->translator->expects($this->once()) + ->method('transChoice') + ->with('Choice error', 1, array('foo2' => 'bar2')) + ->will($this->returnValue('Translated choice error')); + + // passed null value should override preconfigured value "invalid" + $this->context->addViolation('Error', array('foo1' => 'bar1'), null); + $this->context->addViolation('Choice error', array('foo2' => 'bar2'), null, 1); + + $this->assertEquals(new ConstraintViolationList(array( + new ConstraintViolation( + 'Translated error', + 'Error', + array('foo1' => 'bar1'), + 'Root', + 'foo.bar', + null + ), + new ConstraintViolation( + 'Translated choice error', + 'Choice error', + array('foo2' => 'bar2'), + 'Root', + 'foo.bar', + null, + 1 + ), + )), $this->context->getViolations()); + } + + public function testAddViolationAt() + { + $this->translator->expects($this->once()) + ->method('trans') + ->with('Error', array('foo' => 'bar')) + ->will($this->returnValue('Translated error')); + + // override preconfigured property path + $this->context->addViolationAt('bam.baz', 'Error', array('foo' => 'bar'), 'invalid'); + + $this->assertEquals(new ConstraintViolationList(array( + new ConstraintViolation( + 'Translated error', + 'Error', + array('foo' => 'bar'), + 'Root', + 'foo.bar.bam.baz', + 'invalid' + ), + )), $this->context->getViolations()); + } + + public function testAddViolationAtUsesPreconfiguredValueIfNotPassed() + { + $this->translator->expects($this->once()) + ->method('trans') + ->with('Error', array()) + ->will($this->returnValue('Translated error')); + + $this->context->addViolationAt('bam.baz', 'Error'); + + $this->assertEquals(new ConstraintViolationList(array( + new ConstraintViolation( + 'Translated error', + 'Error', + array(), + 'Root', + 'foo.bar.bam.baz', + 'currentValue' + ), + )), $this->context->getViolations()); + } + + public function testAddViolationAtUsesPassedNullValue() + { + $this->translator->expects($this->once()) + ->method('trans') + ->with('Error', array('foo' => 'bar')) + ->will($this->returnValue('Translated error')); + $this->translator->expects($this->once()) + ->method('transChoice') + ->with('Choice error', 2, array('foo' => 'bar')) + ->will($this->returnValue('Translated choice error')); + + // passed null value should override preconfigured value "invalid" + $this->context->addViolationAt('bam.baz', 'Error', array('foo' => 'bar'), null); + $this->context->addViolationAt('bam.baz', 'Choice error', array('foo' => 'bar'), null, 2); + + $this->assertEquals(new ConstraintViolationList(array( + new ConstraintViolation( + 'Translated error', + 'Error', + array('foo' => 'bar'), + 'Root', + 'foo.bar.bam.baz', + null + ), + new ConstraintViolation( + 'Translated choice error', + 'Choice error', + array('foo' => 'bar'), + 'Root', + 'foo.bar.bam.baz', + null, + 2 + ), + )), $this->context->getViolations()); + } + + public function testAddViolationPluralTranslationError() + { + $this->translator->expects($this->once()) + ->method('transChoice') + ->with('foo') + ->will($this->throwException(new \InvalidArgumentException())); + $this->translator->expects($this->once()) + ->method('trans') + ->with('foo'); + + $this->context->addViolation('foo', array(), null, 2); + } + + public function testGetPropertyPath() + { + $this->assertEquals('foo.bar', $this->context->getPropertyPath()); + } + + public function testGetPropertyPathWithIndexPath() + { + $this->assertEquals('foo.bar[bam]', $this->context->getPropertyPath('[bam]')); + } + + public function testGetPropertyPathWithEmptyPath() + { + $this->assertEquals('foo.bar', $this->context->getPropertyPath('')); + } + + public function testGetPropertyPathWithEmptyCurrentPropertyPath() + { + $this->context = new ExecutionContext($this->globalContext, $this->translator, self::TRANS_DOMAIN, $this->metadata, 'currentValue', 'Group', ''); + + $this->assertEquals('bam.baz', $this->context->getPropertyPath('bam.baz')); + } + + public function testGetPropertyPathWithNestedCollectionsAndAllMixed() + { + $constraints = new Collection(array( + 'shelves' => new All(array('constraints' => array( + new Collection(array( + 'name' => new ConstraintA(), + 'books' => new All(array('constraints' => array( + new ConstraintA(), + ))), + )), + ))), + 'name' => new ConstraintA(), + )); + $data = array( + 'shelves' => array( + array( + 'name' => 'Research', + 'books' => array('foo', 'bar'), + ), + array( + 'name' => 'VALID', + 'books' => array('foozy', 'VALID', 'bazzy'), + ), + ), + 'name' => 'Library', + ); + $expectedViolationPaths = array( + '[shelves][0][name]', + '[shelves][0][books][0]', + '[shelves][0][books][1]', + '[shelves][1][books][0]', + '[shelves][1][books][2]', + '[name]', + ); + + $visitor = new ValidationVisitor('Root', $this->metadataFactory, new ConstraintValidatorFactory(), $this->translator); + $context = new ExecutionContext($visitor, $this->translator, self::TRANS_DOMAIN); + $context->validateValue($data, $constraints); + + foreach ($context->getViolations() as $violation) { + $violationPaths[] = $violation->getPropertyPath(); + } + + $this->assertEquals($expectedViolationPaths, $violationPaths); + } +} + +class ExecutionContextTest_TestClass +{ + public $myProperty; +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/LegacyValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/LegacyValidatorTest.php new file mode 100644 index 0000000..a38f1ab --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/LegacyValidatorTest.php @@ -0,0 +1,42 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use Symfony\Component\Translation\IdentityTranslator; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintValidatorFactory; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Tests\Validator\AbstractLegacyApiTest; +use Symfony\Component\Validator\Validator as LegacyValidator; + +/** + * @group legacy + */ +class LegacyValidatorTest extends AbstractLegacyApiTest +{ + protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) + { + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + return new LegacyValidator($metadataFactory, new ConstraintValidatorFactory(), $translator, 'validators', $objectInitializers); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ValidatorException + */ + public function testValidateValueRejectsValid() + { + $this->validator->validateValue(new Entity(), new Valid()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/DoctrineCacheTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/DoctrineCacheTest.php new file mode 100644 index 0000000..19b2922 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/DoctrineCacheTest.php @@ -0,0 +1,85 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Cache; + +use Doctrine\Common\Cache\ArrayCache; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\Cache\DoctrineCache; + +class DoctrineCacheTest extends TestCase +{ + private $cache; + + public function testWrite() + { + $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') + ->disableOriginalConstructor() + ->setMethods(array('getClassName')) + ->getMock(); + + $meta->expects($this->once()) + ->method('getClassName') + ->will($this->returnValue('bar')); + + $this->cache->write($meta); + + $this->assertInstanceOf( + 'Symfony\\Component\\Validator\\Mapping\\ClassMetadata', + $this->cache->read('bar'), + 'write() stores metadata' + ); + } + + public function testHas() + { + $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') + ->disableOriginalConstructor() + ->setMethods(array('getClassName')) + ->getMock(); + + $meta->expects($this->once()) + ->method('getClassName') + ->will($this->returnValue('bar')); + + $this->assertFalse($this->cache->has('bar'), 'has() returns false when there is no entry'); + + $this->cache->write($meta); + $this->assertTrue($this->cache->has('bar'), 'has() returns true when the is an entry'); + } + + public function testRead() + { + $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') + ->disableOriginalConstructor() + ->setMethods(array('getClassName')) + ->getMock(); + + $meta->expects($this->once()) + ->method('getClassName') + ->will($this->returnValue('bar')); + + $this->assertFalse($this->cache->read('bar'), 'read() returns false when there is no entry'); + + $this->cache->write($meta); + + $this->assertInstanceOf( + 'Symfony\\Component\\Validator\\Mapping\\ClassMetadata', + $this->cache->read('bar'), + 'read() returns metadata' + ); + } + + protected function setUp() + { + $this->cache = new DoctrineCache(new ArrayCache()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/LegacyApcCacheTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/LegacyApcCacheTest.php new file mode 100644 index 0000000..7102474 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/LegacyApcCacheTest.php @@ -0,0 +1,83 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Cache; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\Cache\ApcCache; + +/** + * @group legacy + * @requires extension apc + */ +class LegacyApcCacheTest extends TestCase +{ + protected function setUp() + { + if (!filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) || !filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) { + $this->markTestSkipped('APC is not enabled.'); + } + } + + public function testWrite() + { + $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') + ->disableOriginalConstructor() + ->setMethods(array('getClassName')) + ->getMock(); + + $meta->expects($this->once()) + ->method('getClassName') + ->will($this->returnValue('bar')); + + $cache = new ApcCache('foo'); + $cache->write($meta); + + $this->assertInstanceOf('Symfony\\Component\\Validator\\Mapping\\ClassMetadata', apc_fetch('foobar'), '->write() stores metadata in APC'); + } + + public function testHas() + { + $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') + ->disableOriginalConstructor() + ->setMethods(array('getClassName')) + ->getMock(); + + $meta->expects($this->once()) + ->method('getClassName') + ->will($this->returnValue('bar')); + + apc_delete('foobar'); + + $cache = new ApcCache('foo'); + $this->assertFalse($cache->has('bar'), '->has() returns false when there is no entry'); + + $cache->write($meta); + $this->assertTrue($cache->has('bar'), '->has() returns true when the is an entry'); + } + + public function testRead() + { + $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') + ->disableOriginalConstructor() + ->setMethods(array('getClassName')) + ->getMock(); + + $meta->expects($this->once()) + ->method('getClassName') + ->will($this->returnValue('bar')); + + $cache = new ApcCache('foo'); + $cache->write($meta); + + $this->assertInstanceOf('Symfony\\Component\\Validator\\Mapping\\ClassMetadata', $cache->read('bar'), '->read() returns metadata'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/ClassMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/ClassMetadataTest.php new file mode 100644 index 0000000..a3f8a8c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/ClassMetadataTest.php @@ -0,0 +1,323 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; +use Symfony\Component\Validator\Tests\Fixtures\PropertyConstraint; + +class ClassMetadataTest extends TestCase +{ + const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; + const PROVIDERCLASS = 'Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'; + const PROVIDERCHILDCLASS = 'Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderChildEntity'; + + protected $metadata; + + protected function setUp() + { + $this->metadata = new ClassMetadata(self::CLASSNAME); + } + + protected function tearDown() + { + $this->metadata = null; + } + + public function testAddConstraintDoesNotAcceptValid() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + $this->metadata->addConstraint(new Valid()); + } + + public function testAddConstraintRequiresClassConstraints() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + $this->metadata->addConstraint(new PropertyConstraint()); + } + + public function testAddPropertyConstraints() + { + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + $this->metadata->addPropertyConstraint('lastName', new ConstraintB()); + + $this->assertEquals(array('firstName', 'lastName'), $this->metadata->getConstrainedProperties()); + } + + public function testAddMultiplePropertyConstraints() + { + $this->metadata->addPropertyConstraints('lastName', array(new ConstraintA(), new ConstraintB())); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'Entity'))), + new ConstraintB(array('groups' => array('Default', 'Entity'))), + ); + + $properties = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertCount(1, $properties); + $this->assertEquals('lastName', $properties[0]->getName()); + $this->assertEquals($constraints, $properties[0]->getConstraints()); + } + + public function testAddGetterConstraints() + { + $this->metadata->addGetterConstraint('lastName', new ConstraintA()); + $this->metadata->addGetterConstraint('lastName', new ConstraintB()); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'Entity'))), + new ConstraintB(array('groups' => array('Default', 'Entity'))), + ); + + $properties = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertCount(1, $properties); + $this->assertEquals('getLastName', $properties[0]->getName()); + $this->assertEquals($constraints, $properties[0]->getConstraints()); + } + + public function testAddMultipleGetterConstraints() + { + $this->metadata->addGetterConstraints('lastName', array(new ConstraintA(), new ConstraintB())); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'Entity'))), + new ConstraintB(array('groups' => array('Default', 'Entity'))), + ); + + $properties = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertCount(1, $properties); + $this->assertEquals('getLastName', $properties[0]->getName()); + $this->assertEquals($constraints, $properties[0]->getConstraints()); + } + + public function testMergeConstraintsMergesClassConstraints() + { + $parent = new ClassMetadata(self::PARENTCLASS); + $parent->addConstraint(new ConstraintA()); + + $this->metadata->mergeConstraints($parent); + $this->metadata->addConstraint(new ConstraintA()); + + $constraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))), + ); + + $this->assertEquals($constraints, $this->metadata->getConstraints()); + } + + public function testMergeConstraintsMergesMemberConstraints() + { + $parent = new ClassMetadata(self::PARENTCLASS); + $parent->addPropertyConstraint('firstName', new ConstraintA()); + $parent->addPropertyConstraint('firstName', new ConstraintB(array('groups' => 'foo'))); + + $this->metadata->mergeConstraints($parent); + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + + $constraintA1 = new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))); + $constraintA2 = new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))); + $constraintB = new ConstraintB(array( + 'groups' => array('foo'), + )); + + $constraints = array( + $constraintA1, + $constraintB, + $constraintA2, + ); + + $constraintsByGroup = array( + 'Default' => array( + $constraintA1, + $constraintA2, + ), + 'EntityParent' => array( + $constraintA1, + ), + 'Entity' => array( + $constraintA1, + $constraintA2, + ), + 'foo' => array( + $constraintB, + ), + ); + + $members = $this->metadata->getPropertyMetadata('firstName'); + + $this->assertCount(1, $members); + $this->assertEquals(self::PARENTCLASS, $members[0]->getClassName()); + $this->assertEquals($constraints, $members[0]->getConstraints()); + $this->assertEquals($constraintsByGroup, $members[0]->constraintsByGroup); + } + + public function testMemberMetadatas() + { + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + + $this->assertTrue($this->metadata->hasPropertyMetadata('firstName')); + $this->assertFalse($this->metadata->hasPropertyMetadata('non_existent_field')); + } + + public function testMergeConstraintsKeepsPrivateMembersSeparate() + { + $parent = new ClassMetadata(self::PARENTCLASS); + $parent->addPropertyConstraint('internal', new ConstraintA()); + + $this->metadata->mergeConstraints($parent); + $this->metadata->addPropertyConstraint('internal', new ConstraintA()); + + $parentConstraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))), + ); + $constraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))), + ); + + $members = $this->metadata->getPropertyMetadata('internal'); + + $this->assertCount(2, $members); + $this->assertEquals(self::PARENTCLASS, $members[0]->getClassName()); + $this->assertEquals($parentConstraints, $members[0]->getConstraints()); + $this->assertEquals(self::CLASSNAME, $members[1]->getClassName()); + $this->assertEquals($constraints, $members[1]->getConstraints()); + } + + public function testGetReflectionClass() + { + $reflClass = new \ReflectionClass(self::CLASSNAME); + + $this->assertEquals($reflClass, $this->metadata->getReflectionClass()); + } + + public function testSerialize() + { + $this->metadata->addConstraint(new ConstraintA(array('property1' => 'A'))); + $this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup'))); + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + $this->metadata->addGetterConstraint('lastName', new ConstraintB()); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + public function testGroupSequencesWorkIfContainingDefaultGroup() + { + $this->metadata->setGroupSequence(array('Foo', $this->metadata->getDefaultGroup())); + + $this->assertInstanceOf('Symfony\Component\Validator\Constraints\GroupSequence', $this->metadata->getGroupSequence()); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequencesFailIfNotContainingDefaultGroup() + { + $this->metadata->setGroupSequence(array('Foo', 'Bar')); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequencesFailIfContainingDefault() + { + $this->metadata->setGroupSequence(array('Foo', $this->metadata->getDefaultGroup(), Constraint::DEFAULT_GROUP)); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequenceFailsIfGroupSequenceProviderIsSet() + { + $metadata = new ClassMetadata(self::PROVIDERCLASS); + $metadata->setGroupSequenceProvider(true); + $metadata->setGroupSequence(array('GroupSequenceProviderEntity', 'Foo')); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequenceProviderFailsIfGroupSequenceIsSet() + { + $metadata = new ClassMetadata(self::PROVIDERCLASS); + $metadata->setGroupSequence(array('GroupSequenceProviderEntity', 'Foo')); + $metadata->setGroupSequenceProvider(true); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequenceProviderFailsIfDomainClassIsInvalid() + { + $metadata = new ClassMetadata('stdClass'); + $metadata->setGroupSequenceProvider(true); + } + + public function testGroupSequenceProvider() + { + $metadata = new ClassMetadata(self::PROVIDERCLASS); + $metadata->setGroupSequenceProvider(true); + $this->assertTrue($metadata->isGroupSequenceProvider()); + } + + public function testMergeConstraintsMergesGroupSequenceProvider() + { + $parent = new ClassMetadata(self::PROVIDERCLASS); + $parent->setGroupSequenceProvider(true); + + $metadata = new ClassMetadata(self::PROVIDERCHILDCLASS); + $metadata->mergeConstraints($parent); + + $this->assertTrue($metadata->isGroupSequenceProvider()); + } + + /** + * https://github.com/symfony/symfony/issues/11604. + */ + public function testGetPropertyMetadataReturnsEmptyArrayWithoutConfiguredMetadata() + { + $this->assertCount(0, $this->metadata->getPropertyMetadata('foo'), '->getPropertyMetadata() returns an empty collection if no metadata is configured for the given property'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php new file mode 100644 index 0000000..a323567 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php @@ -0,0 +1,34 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory; + +class BlackHoleMetadataFactoryTest extends TestCase +{ + /** + * @expectedException \LogicException + */ + public function testGetMetadataForThrowsALogicException() + { + $metadataFactory = new BlackHoleMetadataFactory(); + $metadataFactory->getMetadataFor('foo'); + } + + public function testHasMetadataForReturnsFalse() + { + $metadataFactory = new BlackHoleMetadataFactory(); + + $this->assertFalse($metadataFactory->hasMetadataFor('foo')); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php new file mode 100644 index 0000000..de68522 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php @@ -0,0 +1,218 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; + +class LazyLoadingMetadataFactoryTest extends TestCase +{ + const CLASS_NAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + const PARENT_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; + const INTERFACE_A_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceA'; + const INTERFACE_B_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceB'; + const PARENT_INTERFACE_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParentInterface'; + + public function testLoadClassMetadataWithInterface() + { + $factory = new LazyLoadingMetadataFactory(new TestLoader()); + $metadata = $factory->getMetadataFor(self::PARENT_CLASS); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'EntityParent'))), + new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))), + ); + + $this->assertEquals($constraints, $metadata->getConstraints()); + } + + public function testMergeParentConstraints() + { + $factory = new LazyLoadingMetadataFactory(new TestLoader()); + $metadata = $factory->getMetadataFor(self::CLASS_NAME); + + $constraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityInterfaceA', + 'EntityParent', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityInterfaceB', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParentInterface', + 'EntityInterfaceB', + 'Entity', + ))), + ); + + $this->assertEquals($constraints, $metadata->getConstraints()); + } + + public function testWriteMetadataToCache() + { + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory(new TestLoader(), $cache); + + $parentClassConstraints = array( + new ConstraintA(array('groups' => array('Default', 'EntityParent'))), + new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))), + ); + $interfaceAConstraints = array( + new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA'))), + ); + + $cache->expects($this->never()) + ->method('has'); + $cache->expects($this->exactly(2)) + ->method('read') + ->withConsecutive( + array($this->equalTo(self::PARENT_CLASS)), + array($this->equalTo(self::INTERFACE_A_CLASS)) + ) + ->will($this->returnValue(false)); + $cache->expects($this->exactly(2)) + ->method('write') + ->withConsecutive( + $this->callback(function ($metadata) use ($interfaceAConstraints) { + return $interfaceAConstraints == $metadata->getConstraints(); + }), + $this->callback(function ($metadata) use ($parentClassConstraints) { + return $parentClassConstraints == $metadata->getConstraints(); + }) + ); + + $metadata = $factory->getMetadataFor(self::PARENT_CLASS); + + $this->assertEquals(self::PARENT_CLASS, $metadata->getClassName()); + $this->assertEquals($parentClassConstraints, $metadata->getConstraints()); + } + + public function testReadMetadataFromCache() + { + $loader = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory($loader, $cache); + + $metadata = new ClassMetadata(self::PARENT_CLASS); + $metadata->addConstraint(new ConstraintA()); + + $parentClass = self::PARENT_CLASS; + $interfaceClass = self::INTERFACE_A_CLASS; + + $loader->expects($this->never()) + ->method('loadClassMetadata'); + + $cache->expects($this->never()) + ->method('has'); + $cache->expects($this->exactly(2)) + ->method('read') + ->withConsecutive( + array(self::PARENT_CLASS), + array(self::INTERFACE_A_CLASS) + ) + ->willReturnCallback(function ($name) use ($metadata, $parentClass, $interfaceClass) { + if ($parentClass == $name) { + return $metadata; + } + + return new ClassMetadata($interfaceClass); + }); + + $this->assertEquals($metadata, $factory->getMetadataFor(self::PARENT_CLASS)); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException + */ + public function testNonClassNameStringValues() + { + $testedValue = 'error@example.com'; + $loader = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory($loader, $cache); + $cache + ->expects($this->never()) + ->method('read'); + $factory->getMetadataFor($testedValue); + } + + public function testMetadataCacheWithRuntimeConstraint() + { + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory(new TestLoader(), $cache); + + $cache + ->expects($this->any()) + ->method('write') + ->will($this->returnCallback(function ($metadata) { serialize($metadata); })) + ; + + $cache->expects($this->any()) + ->method('read') + ->will($this->returnValue(false)); + + $metadata = $factory->getMetadataFor(self::PARENT_CLASS); + $metadata->addConstraint(new Callback(function () {})); + + $this->assertCount(3, $metadata->getConstraints()); + + $metadata = $factory->getMetadataFor(self::CLASS_NAME); + + $this->assertCount(6, $metadata->getConstraints()); + } + + public function testGroupsFromParent() + { + $reader = new \Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader(); + $factory = new LazyLoadingMetadataFactory($reader); + $metadata = $factory->getMetadataFor('Symfony\Component\Validator\Tests\Fixtures\EntityStaticCarTurbo'); + $groups = array(); + + foreach ($metadata->getPropertyMetadata('wheels') as $propertyMetadata) { + $constraints = $propertyMetadata->getConstraints(); + $groups = array_replace($groups, $constraints[0]->groups); + } + + $this->assertCount(4, $groups); + $this->assertContains('Default', $groups); + $this->assertContains('EntityStaticCarTurbo', $groups); + $this->assertContains('EntityStaticCar', $groups); + $this->assertContains('EntityStaticVehicle', $groups); + } +} + +class TestLoader implements LoaderInterface +{ + public function loadClassMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new ConstraintA()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/GetterMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/GetterMetadataTest.php new file mode 100644 index 0000000..05aef47 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/GetterMetadataTest.php @@ -0,0 +1,72 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\GetterMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Entity; + +class GetterMetadataTest extends TestCase +{ + const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + + public function testInvalidPropertyName() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ValidatorException'); + + new GetterMetadata(self::CLASSNAME, 'foobar'); + } + + public function testGetPropertyValueFromPublicGetter() + { + // private getters don't work yet because ReflectionMethod::setAccessible() + // does not exist yet in a stable PHP release + + $entity = new Entity('foobar'); + $metadata = new GetterMetadata(self::CLASSNAME, 'internal'); + + $this->assertEquals('foobar from getter', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromOverriddenPublicGetter() + { + $entity = new Entity(); + $metadata = new GetterMetadata(self::CLASSNAME, 'data'); + + $this->assertEquals('Overridden data', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromIsser() + { + $entity = new Entity(); + $metadata = new GetterMetadata(self::CLASSNAME, 'valid', 'isValid'); + + $this->assertEquals('valid', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromHasser() + { + $entity = new Entity(); + $metadata = new GetterMetadata(self::CLASSNAME, 'permissions'); + + $this->assertEquals('permissions', $metadata->getPropertyValue($entity)); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ValidatorException + * @expectedExceptionMessage The hasLastName() method does not exist in class Symfony\Component\Validator\Tests\Fixtures\Entity. + */ + public function testUndefinedMethodNameThrowsException() + { + new GetterMetadata(self::CLASSNAME, 'lastName', 'hasLastName'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php new file mode 100644 index 0000000..1fb2e6e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php @@ -0,0 +1,79 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ElementMetadata; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +/** + * @group legacy + */ +class LegacyElementMetadataTest extends TestCase +{ + protected $metadata; + + protected function setUp() + { + $this->metadata = new TestElementMetadata(); + } + + protected function tearDown() + { + $this->metadata = null; + } + + public function testAddConstraints() + { + $this->metadata->addConstraint($constraint1 = new ConstraintA()); + $this->metadata->addConstraint($constraint2 = new ConstraintA()); + + $this->assertEquals(array($constraint1, $constraint2), $this->metadata->getConstraints()); + } + + public function testMultipleConstraintsOfTheSameType() + { + $constraint1 = new ConstraintA(array('property1' => 'A')); + $constraint2 = new ConstraintA(array('property1' => 'B')); + + $this->metadata->addConstraint($constraint1); + $this->metadata->addConstraint($constraint2); + + $this->assertEquals(array($constraint1, $constraint2), $this->metadata->getConstraints()); + } + + public function testFindConstraintsByGroup() + { + $constraint1 = new ConstraintA(array('groups' => 'TestGroup')); + $constraint2 = new ConstraintB(); + + $this->metadata->addConstraint($constraint1); + $this->metadata->addConstraint($constraint2); + + $this->assertEquals(array($constraint1), $this->metadata->findConstraints('TestGroup')); + } + + public function testSerialize() + { + $this->metadata->addConstraint(new ConstraintA(array('property1' => 'A'))); + $this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup'))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } +} + +class TestElementMetadata extends ElementMetadata +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php new file mode 100644 index 0000000..d032f0e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php @@ -0,0 +1,19 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +abstract class AbstractStaticMethodLoader +{ + abstract public static function loadMetadata(ClassMetadata $metadata); +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AnnotationLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AnnotationLoaderTest.php new file mode 100644 index 0000000..6e01193 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AnnotationLoaderTest.php @@ -0,0 +1,164 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; + +class AnnotationLoaderTest extends TestCase +{ + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $reader = new AnnotationReader(); + $loader = new AnnotationLoader($reader); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new AnnotationLoader(new AnnotationReader()); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new AnnotationLoader(new AnnotationReader()); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Callback(array('callback' => 'validateMe', 'payload' => 'foo'))); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => new Range(array('min' => 5)), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterMethodConstraint('valid', 'isValid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + // load reflection class so that the comparison passes + $expected->getReflectionClass(); + + $this->assertEquals($expected, $metadata); + } + + /** + * Test MetaData merge with parent annotation. + */ + public function testLoadParentClassMetadata() + { + $loader = new AnnotationLoader(new AnnotationReader()); + + // Load Parent MetaData + $parent_metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $loader->loadClassMetadata($parent_metadata); + + $expected_parent = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $expected_parent->addPropertyConstraint('other', new NotNull()); + $expected_parent->getReflectionClass(); + + $this->assertEquals($expected_parent, $parent_metadata); + } + + /** + * Test MetaData merge with parent annotation. + */ + public function testLoadClassMetadataAndMerge() + { + $loader = new AnnotationLoader(new AnnotationReader()); + + // Load Parent MetaData + $parent_metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $loader->loadClassMetadata($parent_metadata); + + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + // Merge parent metaData. + $metadata->mergeConstraints($parent_metadata); + + $loader->loadClassMetadata($metadata); + + $expected_parent = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $expected_parent->addPropertyConstraint('other', new NotNull()); + $expected_parent->getReflectionClass(); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->mergeConstraints($expected_parent); + + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Callback(array('callback' => 'validateMe', 'payload' => 'foo'))); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => new Range(array('min' => 5)), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterMethodConstraint('valid', 'isValid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + // load reflection class so that the comparison passes + $expected->getReflectionClass(); + + $this->assertEquals($expected, $metadata); + } + + public function testLoadGroupSequenceProviderAnnotation() + { + $loader = new AnnotationLoader(new AnnotationReader()); + + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $expected->setGroupSequenceProvider(true); + $expected->getReflectionClass(); + + $this->assertEquals($expected, $metadata); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/FilesLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/FilesLoaderTest.php new file mode 100644 index 0000000..6fee7b6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/FilesLoaderTest.php @@ -0,0 +1,49 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; + +class FilesLoaderTest extends TestCase +{ + public function testCallsGetFileLoaderInstanceForeachPath() + { + $loader = $this->getFilesLoader($this->getFileLoader()); + $this->assertEquals(4, $loader->getTimesCalled()); + } + + public function testCallsActualFileLoaderForMetadata() + { + $fileLoader = $this->getFileLoader(); + $fileLoader->expects($this->exactly(4)) + ->method('loadClassMetadata'); + $loader = $this->getFilesLoader($fileLoader); + $loader->loadClassMetadata(new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity')); + } + + public function getFilesLoader(LoaderInterface $loader) + { + return $this->getMockForAbstractClass('Symfony\Component\Validator\Tests\Fixtures\FilesLoader', array(array( + __DIR__.'/constraint-mapping.xml', + __DIR__.'/constraint-mapping.yaml', + __DIR__.'/constraint-mapping.test', + __DIR__.'/constraint-mapping.txt', + ), $loader)); + } + + public function getFileLoader() + { + return $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/LoaderChainTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/LoaderChainTest.php new file mode 100644 index 0000000..0d28b0a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/LoaderChainTest.php @@ -0,0 +1,85 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\LoaderChain; + +class LoaderChainTest extends TestCase +{ + public function testAllLoadersAreCalled() + { + $metadata = new ClassMetadata('\stdClass'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->once()) + ->method('loadClassMetadata') + ->with($this->equalTo($metadata)); + + $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader2->expects($this->once()) + ->method('loadClassMetadata') + ->with($this->equalTo($metadata)); + + $chain = new LoaderChain(array( + $loader1, + $loader2, + )); + + $chain->loadClassMetadata($metadata); + } + + public function testReturnsTrueIfAnyLoaderReturnedTrue() + { + $metadata = new ClassMetadata('\stdClass'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(true)); + + $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader2->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(false)); + + $chain = new LoaderChain(array( + $loader1, + $loader2, + )); + + $this->assertTrue($chain->loadClassMetadata($metadata)); + } + + public function testReturnsFalseIfNoLoaderReturnedTrue() + { + $metadata = new ClassMetadata('\stdClass'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(false)); + + $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader2->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(false)); + + $chain = new LoaderChain(array( + $loader1, + $loader2, + )); + + $this->assertFalse($chain->loadClassMetadata($metadata)); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php new file mode 100644 index 0000000..069ccd3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php @@ -0,0 +1,140 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; + +class StaticMethodLoaderTest extends TestCase +{ + private $errorLevel; + + protected function setUp() + { + $this->errorLevel = error_reporting(); + } + + protected function tearDown() + { + error_reporting($this->errorLevel); + } + + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderEntity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderEntity'); + + $loader->loadClassMetadata($metadata); + + $this->assertEquals(StaticLoaderEntity::$invokedWith, $metadata); + } + + public function testLoadClassMetadataDoesNotRepeatLoadWithParentClasses() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderDocument'); + $loader->loadClassMetadata($metadata); + $this->assertCount(0, $metadata->getConstraints()); + + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\BaseStaticLoaderDocument'); + $loader->loadClassMetadata($metadata); + $this->assertCount(1, $metadata->getConstraints()); + } + + public function testLoadClassMetadataIgnoresInterfaces() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderInterface'); + + $loader->loadClassMetadata($metadata); + + $this->assertCount(0, $metadata->getConstraints()); + } + + public function testLoadClassMetadataInAbstractClasses() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\AbstractStaticLoader'); + + $loader->loadClassMetadata($metadata); + + $this->assertCount(1, $metadata->getConstraints()); + } + + public function testLoadClassMetadataIgnoresAbstractMethods() + { + // Disable error reporting, as AbstractStaticMethodLoader produces a + // strict standards error + error_reporting(0); + + $metadata = new ClassMetadata(__NAMESPACE__.'\AbstractStaticMethodLoader'); + + $loader = new StaticMethodLoader('loadMetadata'); + $loader->loadClassMetadata($metadata); + + $this->assertCount(0, $metadata->getConstraints()); + } +} + +interface StaticLoaderInterface +{ + public static function loadMetadata(ClassMetadata $metadata); +} + +abstract class AbstractStaticLoader +{ + public static function loadMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new ConstraintA()); + } +} + +class StaticLoaderEntity +{ + public static $invokedWith = null; + + public static function loadMetadata(ClassMetadata $metadata) + { + self::$invokedWith = $metadata; + } +} + +class StaticLoaderDocument extends BaseStaticLoaderDocument +{ +} + +class BaseStaticLoaderDocument +{ + public static function loadMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new ConstraintA()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/XmlFileLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/XmlFileLoaderTest.php new file mode 100644 index 0000000..100e4fa --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/XmlFileLoaderTest.php @@ -0,0 +1,136 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\Regex; +use Symfony\Component\Validator\Constraints\Traverse; +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +class XmlFileLoaderTest extends TestCase +{ + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new ConstraintB()); + $expected->addConstraint(new Callback('validateMe')); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Traverse(false)); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new Choice(array('A', 'B'))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => array(new Range(array('min' => 5))), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterConstraint('valid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + $this->assertEquals($expected, $metadata); + } + + public function testLoadClassMetadataWithNonStrings() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping-non-strings.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->addPropertyConstraint('firstName', new Regex(array('pattern' => '/^1/', 'match' => false))); + + $properties = $metadata->getPropertyMetadata('firstName'); + $constraints = $properties[0]->getConstraints(); + + $this->assertFalse($constraints[0]->match); + } + + public function testLoadGroupSequenceProvider() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $expected->setGroupSequenceProvider(true); + + $this->assertEquals($expected, $metadata); + } + + public function testThrowExceptionIfDocTypeIsSet() + { + $loader = new XmlFileLoader(__DIR__.'/withdoctype.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\Symfony\Component\Validator\Exception\MappingException'); + $loader->loadClassMetadata($metadata); + } + + /** + * @see https://github.com/symfony/symfony/pull/12158 + */ + public function testDoNotModifyStateIfExceptionIsThrown() + { + $loader = new XmlFileLoader(__DIR__.'/withdoctype.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + try { + $loader->loadClassMetadata($metadata); + } catch (MappingException $e) { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\Symfony\Component\Validator\Exception\MappingException'); + $loader->loadClassMetadata($metadata); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/YamlFileLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/YamlFileLoaderTest.php new file mode 100644 index 0000000..680c2cc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/YamlFileLoaderTest.php @@ -0,0 +1,139 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +class YamlFileLoaderTest extends TestCase +{ + public function testLoadClassMetadataReturnsFalseIfEmpty() + { + $loader = new YamlFileLoader(__DIR__.'/empty-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + + $r = new \ReflectionProperty($loader, 'classes'); + $r->setAccessible(true); + $this->assertSame(array(), $r->getValue($loader)); + } + + /** + * @dataProvider provideInvalidYamlFiles + * @expectedException \InvalidArgumentException + */ + public function testInvalidYamlFiles($path) + { + $loader = new YamlFileLoader(__DIR__.'/'.$path); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + } + + public function provideInvalidYamlFiles() + { + return array( + array('nonvalid-mapping.yml'), + array('bad-format.yml'), + ); + } + + /** + * @see https://github.com/symfony/symfony/pull/12158 + */ + public function testDoNotModifyStateIfExceptionIsThrown() + { + $loader = new YamlFileLoader(__DIR__.'/nonvalid-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + try { + $loader->loadClassMetadata($metadata); + } catch (\InvalidArgumentException $e) { + // Call again. Again an exception should be thrown + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\InvalidArgumentException'); + $loader->loadClassMetadata($metadata); + } + } + + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new ConstraintB()); + $expected->addConstraint(new Callback('validateMe')); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new Choice(array('A', 'B'))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => array(new Range(array('min' => 5))), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterConstraint('valid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + $this->assertEquals($expected, $metadata); + } + + public function testLoadGroupSequenceProvider() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $expected->setGroupSequenceProvider(true); + + $this->assertEquals($expected, $metadata); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/bad-format.yml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/bad-format.yml new file mode 100644 index 0000000..d2b4ad2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/bad-format.yml @@ -0,0 +1,9 @@ +namespaces: + custom: Symfony\Component\Validator\Tests\Fixtures\ + +Symfony\Component\Validator\Tests\Fixtures\Entity: + constraints: + # Custom constraint + - Symfony\Component\Validator\Tests\Fixtures\ConstraintA: ~ + # Custom constraint with namespaces prefix + - "custom:ConstraintB": ~ diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml new file mode 100644 index 0000000..dfd5edd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" ?> + +<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd"> + + <namespace prefix="custom">Symfony\Component\Validator\Tests\Fixtures\</namespace> + + <class name="Symfony\Component\Validator\Tests\Fixtures\Entity"> + <property name="firstName"> + <!-- Constraint with a Boolean --> + <constraint name="Regex"> + <option name="pattern">/^1/</option> + <option name="match">false</option> + </constraint> + </property> + </class> + +</constraint-mapping> diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.xml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.xml new file mode 100644 index 0000000..b1426cf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.xml @@ -0,0 +1,124 @@ +<?xml version="1.0" ?> + +<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd"> + + <namespace prefix="custom">Symfony\Component\Validator\Tests\Fixtures\</namespace> + + <class name="Symfony\Component\Validator\Tests\Fixtures\Entity"> + + <group-sequence> + <value>Foo</value> + <value>Entity</value> + </group-sequence> + + <!-- CLASS CONSTRAINTS --> + + <!-- Custom constraint --> + <constraint name="Symfony\Component\Validator\Tests\Fixtures\ConstraintA" /> + + <!-- Custom constraint with namespace abbreviation--> + <constraint name="custom:ConstraintB" /> + + <!-- Callbacks --> + <constraint name="Callback">validateMe</constraint> + + <constraint name="Callback">validateMeStatic</constraint> + + <constraint name="Callback"> + <value>Symfony\Component\Validator\Tests\Fixtures\CallbackClass</value> + <value>callback</value> + </constraint> + + <!-- Traverse with boolean default option --> + <constraint name="Traverse"> + false + </constraint> + + <!-- PROPERTY CONSTRAINTS --> + + <property name="firstName"> + + <!-- Constraint without value --> + <constraint name="NotNull" /> + + <!-- Constraint with single value --> + <constraint name="Range"> + <option name="min">3</option> + </constraint> + + <!-- Constraint with multiple values --> + <constraint name="Choice"> + <value>A</value> + <value>B</value> + </constraint> + + <!-- Constraint with child constraints --> + <constraint name="All"> + <constraint name="NotNull" /> + <constraint name="Range"> + <option name="min">3</option> + </constraint> + + </constraint> + + <!-- Option with child constraints --> + <constraint name="All"> + <option name="constraints"> + <constraint name="NotNull" /> + <constraint name="Range"> + <option name="min">3</option> + </constraint> + </option> + </constraint> + + <!-- Value with child constraints --> + <constraint name="Collection"> + <option name="fields"> + <value key="foo"> + <constraint name="NotNull" /> + <constraint name="Range"> + <option name="min">3</option> + </constraint> + </value> + <value key="bar"> + <constraint name="Range"> + <option name="min">5</option> + </constraint> + </value> + </option> + </constraint> + + <!-- Constraint with options --> + <constraint name="Choice"> + <!-- Option with single value --> + <option name="message"> Must be one of %choices% </option> + <!-- Option with multiple values --> + <option name="choices"> + <value>A</value> + <value>B</value> + </option> + </constraint> + </property> + + <!-- GETTER CONSTRAINTS --> + + <getter property="lastName"> + <constraint name="NotNull" /> + </getter> + <getter property="valid"> + <constraint name="IsTrue" /> + </getter> + <getter property="permissions"> + <constraint name="IsTrue" /> + </getter> + </class> + + <class name="Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity"> + + <!-- GROUP SEQUENCE PROVIDER --> + <group-sequence-provider /> + + </class> +</constraint-mapping> diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.yml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.yml new file mode 100644 index 0000000..c39168c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.yml @@ -0,0 +1,62 @@ +namespaces: + custom: Symfony\Component\Validator\Tests\Fixtures\ + +Symfony\Component\Validator\Tests\Fixtures\Entity: + group_sequence: + - Foo + - Entity + + constraints: + # Custom constraint + - Symfony\Component\Validator\Tests\Fixtures\ConstraintA: ~ + # Custom constraint with namespaces prefix + - "custom:ConstraintB": ~ + # Callbacks + - Callback: validateMe + - Callback: validateMeStatic + - Callback: [Symfony\Component\Validator\Tests\Fixtures\CallbackClass, callback] + + properties: + firstName: + # Constraint without value + - NotNull: ~ + # Constraint with single value + - Range: + min: 3 + # Constraint with multiple values + - Choice: [A, B] + # Constraint with child constraints + - All: + - NotNull: ~ + - Range: + min: 3 + # Option with child constraints + - All: + constraints: + - NotNull: ~ + - Range: + min: 3 + # Value with child constraints + - Collection: + fields: + foo: + - NotNull: ~ + - Range: + min: 3 + bar: + - Range: + min: 5 + # Constraint with options + - Choice: { choices: [A, B], message: Must be one of %choices% } + dummy: + + getters: + lastName: + - NotNull: ~ + valid: + - "IsTrue": ~ + permissions: + - "IsTrue": ~ + +Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity: + group_sequence_provider: true diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/empty-mapping.yml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/empty-mapping.yml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/empty-mapping.yml diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/nonvalid-mapping.yml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/nonvalid-mapping.yml new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/nonvalid-mapping.yml @@ -0,0 +1 @@ +foo diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/withdoctype.xml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/withdoctype.xml new file mode 100644 index 0000000..0beacc3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/withdoctype.xml @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<!DOCTYPE foo> +<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd"> + <class name="Symfony\Component\Validator\Tests\Fixtures\Entity" /> +</constraint-mapping> diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/MemberMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/MemberMetadataTest.php new file mode 100644 index 0000000..f0726c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/MemberMetadataTest.php @@ -0,0 +1,120 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Mapping\MemberMetadata; +use Symfony\Component\Validator\Tests\Fixtures\ClassConstraint; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +class MemberMetadataTest extends TestCase +{ + protected $metadata; + + protected function setUp() + { + $this->metadata = new TestMemberMetadata( + 'Symfony\Component\Validator\Tests\Fixtures\Entity', + 'getLastName', + 'lastName' + ); + } + + protected function tearDown() + { + $this->metadata = null; + } + + /** + * @group legacy + */ + public function testLegacyAddValidSetsMemberToCascaded() + { + $result = $this->metadata->addConstraint(new Valid()); + + $this->assertEquals(array(), $this->metadata->getConstraints()); + $this->assertEquals($result, $this->metadata); + $this->assertTrue($this->metadata->isCascaded()); + } + + /** + * @group legacy + */ + public function testLegacyAddOtherConstraintDoesNotSetMemberToCascaded() + { + $result = $this->metadata->addConstraint($constraint = new ConstraintA()); + + $this->assertEquals(array($constraint), $this->metadata->getConstraints()); + $this->assertEquals($result, $this->metadata); + $this->assertFalse($this->metadata->isCascaded()); + } + + public function testAddConstraintRequiresClassConstraints() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + $this->metadata->addConstraint(new ClassConstraint()); + } + + public function testSerialize() + { + $this->metadata->addConstraint(new ConstraintA(array('property1' => 'A'))); + $this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup'))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + public function testSerializeCollectionCascaded() + { + $this->metadata->addConstraint(new Valid(array('traverse' => true))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + /** + * @group legacy + */ + public function testLegacySerializeCollectionCascadedDeeply() + { + $this->metadata->addConstraint(new Valid(array('traverse' => true))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + public function testSerializeCollectionNotCascaded() + { + $this->metadata->addConstraint(new Valid(array('traverse' => false))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } +} + +class TestMemberMetadata extends MemberMetadata +{ + public function getPropertyValue($object) + { + } + + protected function newReflectionMember($object) + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/PropertyMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/PropertyMetadataTest.php new file mode 100644 index 0000000..9fea435 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/PropertyMetadataTest.php @@ -0,0 +1,56 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\PropertyMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Entity; + +class PropertyMetadataTest extends TestCase +{ + const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; + + public function testInvalidPropertyName() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ValidatorException'); + + new PropertyMetadata(self::CLASSNAME, 'foobar'); + } + + public function testGetPropertyValueFromPrivateProperty() + { + $entity = new Entity('foobar'); + $metadata = new PropertyMetadata(self::CLASSNAME, 'internal'); + + $this->assertEquals('foobar', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromOverriddenPrivateProperty() + { + $entity = new Entity('foobar'); + $metadata = new PropertyMetadata(self::PARENTCLASS, 'data'); + + $this->assertTrue($metadata->isPublic($entity)); + $this->assertEquals('Overridden data', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromRemovedProperty() + { + $entity = new Entity('foobar'); + $metadata = new PropertyMetadata(self::CLASSNAME, 'internal'); + $metadata->name = 'test'; + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ValidatorException'); + $metadata->getPropertyValue($entity); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Resources/TranslationFilesTest.php b/public/system/storage/vendor/symfony/validator/Tests/Resources/TranslationFilesTest.php new file mode 100644 index 0000000..64b3f78 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Resources/TranslationFilesTest.php @@ -0,0 +1,48 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Resources; + +use PHPUnit\Framework\TestCase; + +class TranslationFilesTest extends TestCase +{ + /** + * @dataProvider provideTranslationFiles + */ + public function testTranslationFileIsValid($filePath) + { + if (class_exists('PHPUnit_Util_XML')) { + \PHPUnit_Util_XML::loadfile($filePath, false, false, true); + } else { + \PHPUnit\Util\XML::loadfile($filePath, false, false, true); + } + + $this->addToAssertionCount(1); + } + + public function provideTranslationFiles() + { + return array_map( + function ($filePath) { return (array) $filePath; }, + glob(\dirname(\dirname(__DIR__)).'/Resources/translations/*.xlf') + ); + } + + public function testNorwegianAlias() + { + $this->assertFileEquals( + \dirname(\dirname(__DIR__)).'/Resources/translations/validators.nb.xlf', + \dirname(\dirname(__DIR__)).'/Resources/translations/validators.no.xlf', + 'The NO locale should be an alias for the NB variant of the Norwegian language.' + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Util/PropertyPathTest.php b/public/system/storage/vendor/symfony/validator/Tests/Util/PropertyPathTest.php new file mode 100644 index 0000000..235e178 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Util/PropertyPathTest.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Util\PropertyPath; + +class PropertyPathTest extends TestCase +{ + /** + * @dataProvider provideAppendPaths + */ + public function testAppend($basePath, $subPath, $expectedPath, $message) + { + $this->assertSame($expectedPath, PropertyPath::append($basePath, $subPath), $message); + } + + public function provideAppendPaths() + { + return array( + array('foo', '', 'foo', 'It returns the basePath if subPath is empty'), + array('', 'bar', 'bar', 'It returns the subPath if basePath is empty'), + array('foo', 'bar', 'foo.bar', 'It append the subPath to the basePath'), + array('foo', '[bar]', 'foo[bar]', 'It does not include the dot separator if subPath uses the array notation'), + array('0', 'bar', '0.bar', 'Leading zeros are kept.'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php new file mode 100644 index 0000000..0394431 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php @@ -0,0 +1,742 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\Expression; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Traverse; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintViolationInterface; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Tests\Fixtures\FailingConstraint; +use Symfony\Component\Validator\Tests\Fixtures\FakeClassMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Reference; +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * Verifies that a validator satisfies the API of Symfony 2.5+. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest +{ + /** + * @var ValidatorInterface + */ + protected $validator; + + /** + * @return ValidatorInterface + */ + abstract protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()); + + protected function setUp() + { + parent::setUp(); + + $this->validator = $this->createValidator($this->metadataFactory); + } + + protected function validate($value, $constraints = null, $groups = null) + { + return $this->validator->validate($value, $constraints, $groups); + } + + protected function validateProperty($object, $propertyName, $groups = null) + { + return $this->validator->validateProperty($object, $propertyName, $groups); + } + + protected function validatePropertyValue($object, $propertyName, $value, $groups = null) + { + return $this->validator->validatePropertyValue($object, $propertyName, $value, $groups); + } + + public function testValidateConstraintWithoutGroup() + { + $violations = $this->validator->validate(null, new NotNull()); + + $this->assertCount(1, $violations); + } + + public function testValidateWithEmptyArrayAsConstraint() + { + $violations = $this->validator->validate('value', array()); + $this->assertCount(0, $violations); + } + + public function testGroupSequenceAbortsAfterFailedGroup() + { + $entity = new Entity(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message 1'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message 2'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => function () {}, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 2', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 3', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Group 2', 'Group 3')); + $violations = $this->validator->validate($entity, new Valid(), $sequence); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message 1', $violations[0]->getMessage()); + } + + public function testGroupSequenceIncludesReferences() + { + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Reference violation 1'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Reference violation 2'); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 1', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 2', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Entity')); + $violations = $this->validator->validate($entity, new Valid(), $sequence); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Reference violation 1', $violations[0]->getMessage()); + } + + public function testValidateInSeparateContext() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $violations = $context + ->getValidator() + // Since the validator is not context aware, the group must + // be passed explicitly + ->validate($value->reference, new Valid(), 'Group') + ; + + /* @var ConstraintViolationInterface[] $violations */ + $test->assertCount(1, $violations); + $test->assertSame('Message value', $violations[0]->getMessage()); + $test->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $test->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $test->assertSame('', $violations[0]->getPropertyPath()); + // The root is different as we're in a new context + $test->assertSame($entity->reference, $violations[0]->getRoot()); + $test->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $test->assertNull($violations[0]->getPlural()); + $test->assertNull($violations[0]->getCode()); + + // Verify that this method is called + $context->addViolation('Separate violation'); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($entity->reference, $context->getRoot()); + $test->assertSame($entity->reference, $context->getValue()); + $test->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validator->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $test->assertSame('Separate violation', $violations[0]->getMessage()); + } + + public function testValidateInContext() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { + $previousValue = $context->getValue(); + $previousObject = $context->getObject(); + $previousMetadata = $context->getMetadata(); + $previousPath = $context->getPropertyPath(); + $previousGroup = $context->getGroup(); + + $context + ->getValidator() + ->inContext($context) + ->atPath('subpath') + ->validate($value->reference) + ; + + // context changes shouldn't leak out of the validate() call + $test->assertSame($previousValue, $context->getValue()); + $test->assertSame($previousObject, $context->getObject()); + $test->assertSame($previousMetadata, $context->getMetadata()); + $test->assertSame($previousPath, $context->getPropertyPath()); + $test->assertSame($previousGroup, $context->getGroup()); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('subpath', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity->reference, $context->getValue()); + $test->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validator->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('subpath', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testValidateArrayInContext() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { + $previousValue = $context->getValue(); + $previousObject = $context->getObject(); + $previousMetadata = $context->getMetadata(); + $previousPath = $context->getPropertyPath(); + $previousGroup = $context->getGroup(); + + $context + ->getValidator() + ->inContext($context) + ->atPath('subpath') + ->validate(array('key' => $value->reference)) + ; + + // context changes shouldn't leak out of the validate() call + $test->assertSame($previousValue, $context->getValue()); + $test->assertSame($previousObject, $context->getObject()); + $test->assertSame($previousMetadata, $context->getMetadata()); + $test->assertSame($previousPath, $context->getPropertyPath()); + $test->assertSame($previousGroup, $context->getGroup()); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('subpath[key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity->reference, $context->getValue()); + $test->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validator->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('subpath[key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testTraverseTraversableByDefault() + { + $test = $this; + $entity = new Entity(); + $traversable = new \ArrayIterator(array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $traversable) { + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('[key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->metadata, $context->getMetadata()); + $test->assertSame($traversable, $context->getRoot()); + $test->assertSame($entity, $context->getValue()); + $test->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadataFactory->addMetadata(new ClassMetadata('ArrayIterator')); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[key]', $violations[0]->getPropertyPath()); + $this->assertSame($traversable, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testTraversalEnabledOnClass() + { + $entity = new Entity(); + $traversable = new \ArrayIterator(array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(true)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testTraversalDisabledOnClass() + { + $test = $this; + $entity = new Entity(); + $traversable = new \ArrayIterator(array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) use ($test) { + $test->fail('Should not be called'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(false)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testExpectTraversableIfTraversalEnabledOnClass() + { + $entity = new Entity(); + + $this->metadata->addConstraint(new Traverse(true)); + + $this->validator->validate($entity); + } + + public function testReferenceTraversalDisabledOnClass() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) use ($test) { + $test->fail('Should not be called'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(false)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $violations = $this->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testReferenceTraversalEnabledOnReferenceDisabledOnClass() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) use ($test) { + $test->fail('Should not be called'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(false)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => true, + ))); + + $violations = $this->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testReferenceTraversalDisabledOnReferenceEnabledOnClass() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) use ($test) { + $test->fail('Should not be called'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(true)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + + $violations = $this->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testAddCustomizedViolation() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->buildViolation('Message %param%') + ->setParameter('%param%', 'value') + ->setInvalidValue('Invalid value') + ->setPlural(2) + ->setCode(42) + ->addViolation(); + }; + + $this->metadata->addConstraint(new Callback($callback)); + + $violations = $this->validator->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Invalid value', $violations[0]->getInvalidValue()); + $this->assertSame(2, $violations[0]->getPlural()); + $this->assertSame(42, $violations[0]->getCode()); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnsupportedMetadataException + * @group legacy + */ + public function testMetadataMustImplementClassMetadataInterface() + { + $entity = new Entity(); + + $metadata = $this->getMockBuilder('Symfony\Component\Validator\Tests\Fixtures\LegacyClassMetadata')->getMock(); + $metadata->expects($this->any()) + ->method('getClassName') + ->will($this->returnValue(\get_class($entity))); + + $this->metadataFactory->addMetadata($metadata); + + $this->validator->validate($entity); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnsupportedMetadataException + * @group legacy + */ + public function testReferenceMetadataMustImplementClassMetadataInterface() + { + $entity = new Entity(); + $entity->reference = new Reference(); + + $metadata = $this->getMockBuilder('Symfony\Component\Validator\Tests\Fixtures\LegacyClassMetadata')->getMock(); + $metadata->expects($this->any()) + ->method('getClassName') + ->will($this->returnValue(\get_class($entity->reference))); + + $this->metadataFactory->addMetadata($metadata); + + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $this->validator->validate($entity); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnsupportedMetadataException + * @group legacy + */ + public function testLegacyPropertyMetadataMustImplementPropertyMetadataInterface() + { + $entity = new Entity(); + + // Legacy interface + $propertyMetadata = $this->getMockBuilder('Symfony\Component\Validator\MetadataInterface')->getMock(); + $metadata = new FakeClassMetadata(\get_class($entity)); + $metadata->addCustomPropertyMetadata('firstName', $propertyMetadata); + + $this->metadataFactory->addMetadata($metadata); + + $this->validator->validate($entity); + } + + public function testNoDuplicateValidationIfClassConstraintInMultipleGroups() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => array('Group 1', 'Group 2'), + ))); + + $violations = $this->validator->validate($entity, new Valid(), array('Group 1', 'Group 2')); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testNoDuplicateValidationIfPropertyConstraintInMultipleGroups() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback, + 'groups' => array('Group 1', 'Group 2'), + ))); + + $violations = $this->validator->validate($entity, new Valid(), array('Group 1', 'Group 2')); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\RuntimeException + */ + public function testValidateFailsIfNoConstraintsAndNoObjectOrArray() + { + $this->validate('Foobar'); + } + + public function testAccessCurrentObject() + { + $test = $this; + $called = false; + $entity = new Entity(); + $entity->firstName = 'Bernhard'; + $entity->data = array('firstName' => 'Bernhard'); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, &$called) { + $called = true; + $test->assertSame($entity, $context->getObject()); + }; + + $this->metadata->addConstraint(new Callback($callback)); + $this->metadata->addPropertyConstraint('firstName', new Callback($callback)); + $this->metadata->addPropertyConstraint('data', new Collection(array('firstName' => new Expression('value == this.firstName')))); + + $this->validator->validate($entity); + + $this->assertTrue($called); + } + + public function testInitializeObjectsOnFirstValidation() + { + $test = $this; + $entity = new Entity(); + $entity->initialized = false; + + // prepare initializers that set "initialized" to true + $initializer1 = $this->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + $initializer2 = $this->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + + $initializer1->expects($this->once()) + ->method('initialize') + ->with($entity) + ->will($this->returnCallback(function ($object) { + $object->initialized = true; + })); + + $initializer2->expects($this->once()) + ->method('initialize') + ->with($entity); + + $this->validator = $this->createValidator($this->metadataFactory, array( + $initializer1, + $initializer2, + )); + + // prepare constraint which + // * checks that "initialized" is set to true + // * validates the object again + $callback = function ($object, ExecutionContextInterface $context) use ($test) { + $test->assertTrue($object->initialized); + + // validate again in same group + $validator = $context->getValidator()->inContext($context); + + $validator->validate($object); + + // validate again in other group + $validator->validate($object, null, 'SomeGroup'); + }; + + $this->metadata->addConstraint(new Callback($callback)); + + $this->validate($entity); + + $this->assertTrue($entity->initialized); + } + + public function testPassConstraintToViolation() + { + $constraint = new FailingConstraint(); + $violations = $this->validate('Foobar', $constraint); + + $this->assertCount(1, $violations); + $this->assertSame($constraint, $violations[0]->getConstraint()); + } + + public function testCollectionConstraitViolationHasCorrectContext() + { + $data = array( + 'foo' => 'fooValue', + ); + + // Missing field must not be the first in the collection validation + $constraint = new Collection(array( + 'foo' => new NotNull(), + 'bar' => new NotNull(), + )); + + $violations = $this->validate($data, $constraint); + + $this->assertCount(1, $violations); + $this->assertSame($constraint, $violations[0]->getConstraint()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractLegacyApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractLegacyApiTest.php new file mode 100644 index 0000000..4734632 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractLegacyApiTest.php @@ -0,0 +1,313 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintViolationInterface; +use Symfony\Component\Validator\ExecutionContextInterface; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Tests\Fixtures\Reference; +use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; + +/** + * Verifies that a validator satisfies the API of Symfony < 2.5. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * @group legacy + */ +abstract class AbstractLegacyApiTest extends AbstractValidatorTest +{ + /** + * @var LegacyValidatorInterface + */ + protected $validator; + + /** + * @param MetadataFactoryInterface $metadataFactory + * + * @return LegacyValidatorInterface + */ + abstract protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()); + + protected function setUp() + { + parent::setUp(); + + $this->validator = $this->createValidator($this->metadataFactory); + } + + protected function validate($value, $constraints = null, $groups = null) + { + if (null === $constraints) { + $constraints = new Valid(); + } + + if ($constraints instanceof Valid) { + return $this->validator->validate($value, $groups, $constraints->traverse, $constraints->deep); + } + + return $this->validator->validateValue($value, $constraints, $groups); + } + + protected function validateProperty($object, $propertyName, $groups = null) + { + return $this->validator->validateProperty($object, $propertyName, $groups); + } + + protected function validatePropertyValue($object, $propertyName, $value, $groups = null) + { + return $this->validator->validatePropertyValue($object, $propertyName, $value, $groups); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException + */ + public function testTraversableTraverseDisabled() + { + $test = $this; + $entity = new Entity(); + $traversable = new \ArrayIterator(array('key' => $entity)); + + $callback = function () use ($test) { + $test->fail('Should not be called'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $this->validator->validate($traversable, 'Group'); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException + */ + public function testRecursiveTraversableRecursiveTraversalDisabled() + { + $test = $this; + $entity = new Entity(); + $traversable = new \ArrayIterator(array( + 2 => new \ArrayIterator(array('key' => $entity)), + )); + + $callback = function () use ($test) { + $test->fail('Should not be called'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $this->validator->validate($traversable, 'Group'); + } + + public function testValidateInContext() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { + $previousValue = $context->getValue(); + $previousMetadata = $context->getMetadata(); + $previousPath = $context->getPropertyPath(); + $previousGroup = $context->getGroup(); + + $context->validate($value->reference, 'subpath'); + + // context changes shouldn't leak out of the validate() call + $test->assertSame($previousValue, $context->getValue()); + $test->assertSame($previousMetadata, $context->getMetadata()); + $test->assertSame($previousPath, $context->getPropertyPath()); + $test->assertSame($previousGroup, $context->getGroup()); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('subpath', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($test->metadataFactory, $context->getMetadataFactory()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity->reference, $context->getValue()); + $test->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validator->validate($entity, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('subpath', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testValidateArrayInContext() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { + $previousValue = $context->getValue(); + $previousMetadata = $context->getMetadata(); + $previousPath = $context->getPropertyPath(); + $previousGroup = $context->getGroup(); + + $context->validate(array('key' => $value->reference), 'subpath'); + + // context changes shouldn't leak out of the validate() call + $test->assertSame($previousValue, $context->getValue()); + $test->assertSame($previousMetadata, $context->getMetadata()); + $test->assertSame($previousPath, $context->getPropertyPath()); + $test->assertSame($previousGroup, $context->getGroup()); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('subpath[key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($test->metadataFactory, $context->getMetadataFactory()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity->reference, $context->getValue()); + $test->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validator->validate($entity, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('subpath[key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testAddCustomizedViolation() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation( + 'Message %param%', + array('%param%' => 'value'), + 'Invalid value', + 2, + 'Code' + ); + }; + + $this->metadata->addConstraint(new Callback($callback)); + + $violations = $this->validator->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Invalid value', $violations[0]->getInvalidValue()); + $this->assertSame(2, $violations[0]->getPlural()); + $this->assertSame('Code', $violations[0]->getCode()); + } + + public function testInitializeObjectsOnFirstValidation() + { + $test = $this; + $entity = new Entity(); + $entity->initialized = false; + + // prepare initializers that set "initialized" to true + $initializer1 = $this->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + $initializer2 = $this->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + + $initializer1->expects($this->once()) + ->method('initialize') + ->with($entity) + ->will($this->returnCallback(function ($object) { + $object->initialized = true; + })); + + $initializer2->expects($this->once()) + ->method('initialize') + ->with($entity); + + $this->validator = $this->createValidator($this->metadataFactory, array( + $initializer1, + $initializer2, + )); + + // prepare constraint which + // * checks that "initialized" is set to true + // * validates the object again + $callback = function ($object, ExecutionContextInterface $context) use ($test) { + $test->assertTrue($object->initialized); + + // validate again in same group + $context->validate($object); + + // validate again in other group + $context->validate($object, '', 'SomeGroup'); + }; + + $this->metadata->addConstraint(new Callback($callback)); + + $this->validate($entity); + + $this->assertTrue($entity->initialized); + } + + public function testGetMetadataFactory() + { + $this->assertSame($this->metadataFactory, $this->validator->getMetadataFactory()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php new file mode 100644 index 0000000..8dd9adc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php @@ -0,0 +1,1284 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintViolationInterface; +use Symfony\Component\Validator\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Tests\Fixtures\FakeMetadataFactory; +use Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity; +use Symfony\Component\Validator\Tests\Fixtures\Reference; + +/** + * @author Bernhard Schussek <bschussek@gmail.com> + */ +abstract class AbstractValidatorTest extends TestCase +{ + const ENTITY_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + + const REFERENCE_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\Reference'; + + /** + * @var FakeMetadataFactory + */ + public $metadataFactory; + + /** + * @var ClassMetadata + */ + public $metadata; + + /** + * @var ClassMetadata + */ + public $referenceMetadata; + + protected function setUp() + { + $this->metadataFactory = new FakeMetadataFactory(); + $this->metadata = new ClassMetadata(self::ENTITY_CLASS); + $this->referenceMetadata = new ClassMetadata(self::REFERENCE_CLASS); + $this->metadataFactory->addMetadata($this->metadata); + $this->metadataFactory->addMetadata($this->referenceMetadata); + } + + protected function tearDown() + { + $this->metadataFactory = null; + $this->metadata = null; + $this->referenceMetadata = null; + } + + abstract protected function validate($value, $constraints = null, $groups = null); + + abstract protected function validateProperty($object, $propertyName, $groups = null); + + abstract protected function validatePropertyValue($object, $propertyName, $value, $groups = null); + + public function testValidate() + { + $test = $this; + + $callback = function ($value, ExecutionContextInterface $context) use ($test) { + $test->assertNull($context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame('Bernhard', $context->getRoot()); + $test->assertSame('Bernhard', $context->getValue()); + $test->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $constraint = new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + )); + + $violations = $this->validate('Bernhard', $constraint, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + $this->assertSame('Bernhard', $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testClassConstraint() + { + $test = $this; + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->metadata, $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity, $context->getValue()); + $test->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testPropertyConstraint() + { + $test = $this; + $entity = new Entity(); + $entity->firstName = 'Bernhard'; + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $propertyMetadatas = $test->metadata->getPropertyMetadata('firstName'); + + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertSame('firstName', $context->getPropertyName()); + $test->assertSame('firstName', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($propertyMetadatas[0], $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame('Bernhard', $context->getValue()); + $test->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('firstName', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testGetterConstraint() + { + $test = $this; + $entity = new Entity(); + $entity->setLastName('Schussek'); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $propertyMetadatas = $test->metadata->getPropertyMetadata('lastName'); + + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertSame('lastName', $context->getPropertyName()); + $test->assertSame('lastName', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($propertyMetadatas[0], $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame('Schussek', $context->getValue()); + $test->assertSame('Schussek', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addGetterConstraint('lastName', new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('lastName', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Schussek', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testArray() + { + $test = $this; + $entity = new Entity(); + $array = array('key' => $entity); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $array) { + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('[key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->metadata, $context->getMetadata()); + $test->assertSame($array, $context->getRoot()); + $test->assertSame($entity, $context->getValue()); + $test->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($array, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[key]', $violations[0]->getPropertyPath()); + $this->assertSame($array, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testRecursiveArray() + { + $test = $this; + $entity = new Entity(); + $array = array(2 => array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $array) { + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('[2][key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->metadata, $context->getMetadata()); + $test->assertSame($array, $context->getRoot()); + $test->assertSame($entity, $context->getValue()); + $test->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($array, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[2][key]', $violations[0]->getPropertyPath()); + $this->assertSame($array, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testTraversable() + { + $test = $this; + $entity = new Entity(); + $traversable = new \ArrayIterator(array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $traversable) { + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('[key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->metadata, $context->getMetadata()); + $test->assertSame($traversable, $context->getRoot()); + $test->assertSame($entity, $context->getValue()); + $test->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[key]', $violations[0]->getPropertyPath()); + $this->assertSame($traversable, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testRecursiveTraversable() + { + $test = $this; + $entity = new Entity(); + $traversable = new \ArrayIterator(array( + 2 => new \ArrayIterator(array('key' => $entity)), + )); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $traversable) { + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('[2][key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->metadata, $context->getMetadata()); + $test->assertSame($traversable, $context->getRoot()); + $test->assertSame($entity, $context->getValue()); + $test->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[2][key]', $violations[0]->getPropertyPath()); + $this->assertSame($traversable, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testReferenceClassConstraint() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('reference', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity->reference, $context->getValue()); + $test->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testReferencePropertyConstraint() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new Reference(); + $entity->reference->value = 'Foobar'; + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $propertyMetadatas = $test->referenceMetadata->getPropertyMetadata('value'); + + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertSame('value', $context->getPropertyName()); + $test->assertSame('reference.value', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($propertyMetadatas[0], $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame('Foobar', $context->getValue()); + $test->assertSame('Foobar', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addPropertyConstraint('value', new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference.value', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Foobar', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testReferenceGetterConstraint() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new Reference(); + $entity->reference->setPrivateValue('Bamboo'); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $propertyMetadatas = $test->referenceMetadata->getPropertyMetadata('privateValue'); + + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertSame('privateValue', $context->getPropertyName()); + $test->assertSame('reference.privateValue', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($propertyMetadatas[0], $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame('Bamboo', $context->getValue()); + $test->assertSame('Bamboo', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addPropertyConstraint('privateValue', new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference.privateValue', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Bamboo', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testsIgnoreNullReference() + { + $entity = new Entity(); + $entity->reference = null; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException + */ + public function testFailOnScalarReferences() + { + $entity = new Entity(); + $entity->reference = 'string'; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $this->validate($entity); + } + + public function testArrayReference() + { + $test = $this; + $entity = new Entity(); + $entity->reference = array('key' => new Reference()); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('reference[key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity->reference['key'], $context->getValue()); + $test->assertSame($entity->reference['key'], $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference[key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference['key'], $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + // https://github.com/symfony/symfony/issues/6246 + public function testRecursiveArrayReference() + { + $test = $this; + $entity = new Entity(); + $entity->reference = array(2 => array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('reference[2][key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity->reference[2]['key'], $context->getValue()); + $test->assertSame($entity->reference[2]['key'], $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference[2][key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference[2]['key'], $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testArrayTraversalCannotBeDisabled() + { + $entity = new Entity(); + $entity->reference = array('key' => new Reference()); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testRecursiveArrayTraversalCannotBeDisabled() + { + $entity = new Entity(); + $entity->reference = array(2 => array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testIgnoreScalarsDuringArrayTraversal() + { + $entity = new Entity(); + $entity->reference = array('string', 1234); + + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testIgnoreNullDuringArrayTraversal() + { + $entity = new Entity(); + $entity->reference = array(null); + + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testTraversableReference() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('reference[key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity->reference['key'], $context->getValue()); + $test->assertSame($entity->reference['key'], $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference[key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference['key'], $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testDisableTraversableTraversal() + { + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadataFactory->addMetadata(new ClassMetadata('ArrayIterator')); + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException + */ + public function testMetadataMustExistIfTraversalIsDisabled() + { + $entity = new Entity(); + $entity->reference = new \ArrayIterator(); + + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + + $this->validate($entity); + } + + public function testEnableRecursiveTraversableTraversal() + { + $test = $this; + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array( + 2 => new \ArrayIterator(array('key' => new Reference())), + )); + + $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); + $test->assertNull($context->getPropertyName()); + $test->assertSame('reference[2][key]', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($test->referenceMetadata, $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame($entity->reference[2]['key'], $context->getValue()); + $test->assertSame($entity->reference[2]['key'], $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => true, + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference[2][key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference[2]['key'], $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testValidateProperty() + { + $test = $this; + $entity = new Entity(); + $entity->firstName = 'Bernhard'; + $entity->setLastName('Schussek'); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $propertyMetadatas = $test->metadata->getPropertyMetadata('firstName'); + + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertSame('firstName', $context->getPropertyName()); + $test->assertSame('firstName', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($propertyMetadatas[0], $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame('Bernhard', $context->getValue()); + $test->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Other violation'); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('lastName', new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validateProperty($entity, 'firstName', 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('firstName', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + /** + * Cannot be UnsupportedMetadataException for BC with Symfony < 2.5. + * + * @expectedException \Symfony\Component\Validator\Exception\ValidatorException + * @group legacy + */ + public function testLegacyValidatePropertyFailsIfPropertiesNotSupported() + { + // $metadata does not implement PropertyMetadataContainerInterface + $metadata = $this->getMockBuilder('Symfony\Component\Validator\MetadataInterface')->getMock(); + + $this->metadataFactory->addMetadataForValue('VALUE', $metadata); + + $this->validateProperty('VALUE', 'someProperty'); + } + + /** + * https://github.com/symfony/symfony/issues/11604. + */ + public function testValidatePropertyWithoutConstraints() + { + $entity = new Entity(); + $violations = $this->validateProperty($entity, 'lastName'); + + $this->assertCount(0, $violations, '->validateProperty() returns no violations if no constraints have been configured for the property being validated'); + } + + public function testValidatePropertyValue() + { + $test = $this; + $entity = new Entity(); + $entity->setLastName('Schussek'); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { + $propertyMetadatas = $test->metadata->getPropertyMetadata('firstName'); + + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertSame('firstName', $context->getPropertyName()); + $test->assertSame('firstName', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($propertyMetadatas[0], $context->getMetadata()); + $test->assertSame($entity, $context->getRoot()); + $test->assertSame('Bernhard', $context->getValue()); + $test->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Other violation'); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('lastName', new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validatePropertyValue( + $entity, + 'firstName', + 'Bernhard', + 'Group' + ); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('firstName', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testValidatePropertyValueWithClassName() + { + $test = $this; + + $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { + $propertyMetadatas = $test->metadata->getPropertyMetadata('firstName'); + + $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); + $test->assertSame('firstName', $context->getPropertyName()); + $test->assertSame('', $context->getPropertyPath()); + $test->assertSame('Group', $context->getGroup()); + $test->assertSame($propertyMetadatas[0], $context->getMetadata()); + $test->assertSame('Bernhard', $context->getRoot()); + $test->assertSame('Bernhard', $context->getValue()); + $test->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Other violation'); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('lastName', new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validatePropertyValue( + self::ENTITY_CLASS, + 'firstName', + 'Bernhard', + 'Group' + ); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + $this->assertSame('Bernhard', $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + /** + * Cannot be UnsupportedMetadataException for BC with Symfony < 2.5. + * + * @expectedException \Symfony\Component\Validator\Exception\ValidatorException + * @group legacy + */ + public function testLegacyValidatePropertyValueFailsIfPropertiesNotSupported() + { + // $metadata does not implement PropertyMetadataContainerInterface + $metadata = $this->getMockBuilder('Symfony\Component\Validator\MetadataInterface')->getMock(); + + $this->metadataFactory->addMetadataForValue('VALUE', $metadata); + + $this->validatePropertyValue('VALUE', 'someProperty', 'someValue'); + } + + /** + * https://github.com/symfony/symfony/issues/11604. + */ + public function testValidatePropertyValueWithoutConstraints() + { + $entity = new Entity(); + $violations = $this->validatePropertyValue($entity, 'lastName', 'foo'); + + $this->assertCount(0, $violations, '->validatePropertyValue() returns no violations if no constraints have been configured for the property being validated'); + } + + public function testValidateObjectOnlyOncePerGroup() + { + $entity = new Entity(); + $entity->reference = new Reference(); + $entity->reference2 = $entity->reference; + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->metadata->addPropertyConstraint('reference2', new Valid()); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testValidateDifferentObjectsSeparately() + { + $entity = new Entity(); + $entity->reference = new Reference(); + $entity->reference2 = new Reference(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->metadata->addPropertyConstraint('reference2', new Valid()); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(2, $violations); + } + + public function testValidateSingleGroup() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group 2', + ))); + + $violations = $this->validate($entity, null, 'Group 2'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testValidateMultipleGroups() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group 2', + ))); + + $violations = $this->validate($entity, null, array('Group 1', 'Group 2')); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(2, $violations); + } + + public function testReplaceDefaultGroupByGroupSequenceObject() + { + $entity = new Entity(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 2'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 3'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => function () {}, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 2', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 3', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Group 2', 'Group 3', 'Entity')); + $this->metadata->setGroupSequence($sequence); + + $violations = $this->validate($entity, null, 'Default'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); + } + + public function testReplaceDefaultGroupByGroupSequenceArray() + { + $entity = new Entity(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 2'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 3'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => function () {}, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 2', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 3', + ))); + + $sequence = array('Group 1', 'Group 2', 'Group 3', 'Entity'); + $this->metadata->setGroupSequence($sequence); + + $violations = $this->validate($entity, null, 'Default'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); + } + + public function testPropagateDefaultGroupToReferenceWhenReplacingDefaultGroup() + { + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Default group'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in group sequence'); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Default', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 1', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Entity')); + $this->metadata->setGroupSequence($sequence); + + $violations = $this->validate($entity, null, 'Default'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in Default group', $violations[0]->getMessage()); + } + + public function testValidateCustomGroupWhenDefaultGroupWasReplaced() + { + $entity = new Entity(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in other group'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in group sequence'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Other Group', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 1', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Entity')); + $this->metadata->setGroupSequence($sequence); + + $violations = $this->validate($entity, null, 'Other Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in other group', $violations[0]->getMessage()); + } + + public function testReplaceDefaultGroupWithObjectFromGroupSequenceProvider() + { + $sequence = new GroupSequence(array('Group 1', 'Group 2', 'Group 3', 'Entity')); + $entity = new GroupSequenceProviderEntity($sequence); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 2'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 3'); + }; + + $metadata = new ClassMetadata(\get_class($entity)); + $metadata->addConstraint(new Callback(array( + 'callback' => function () {}, + 'groups' => 'Group 1', + ))); + $metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 2', + ))); + $metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 3', + ))); + $metadata->setGroupSequenceProvider(true); + + $this->metadataFactory->addMetadata($metadata); + + $violations = $this->validate($entity, null, 'Default'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); + } + + public function testReplaceDefaultGroupWithArrayFromGroupSequenceProvider() + { + $sequence = array('Group 1', 'Group 2', 'Group 3', 'Entity'); + $entity = new GroupSequenceProviderEntity($sequence); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 2'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 3'); + }; + + $metadata = new ClassMetadata(\get_class($entity)); + $metadata->addConstraint(new Callback(array( + 'callback' => function () {}, + 'groups' => 'Group 1', + ))); + $metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 2', + ))); + $metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 3', + ))); + $metadata->setGroupSequenceProvider(true); + + $this->metadataFactory->addMetadata($metadata); + + $violations = $this->validate($entity, null, 'Default'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php new file mode 100644 index 0000000..fd1287f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php @@ -0,0 +1,35 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use Symfony\Component\Translation\IdentityTranslator; +use Symfony\Component\Validator\ConstraintValidatorFactory; +use Symfony\Component\Validator\Context\LegacyExecutionContextFactory; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\Validator\LegacyValidator; + +/** + * @group legacy + */ +class LegacyValidator2Dot5ApiTest extends Abstract2Dot5ApiTest +{ + protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) + { + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $contextFactory = new LegacyExecutionContextFactory($metadataFactory, $translator); + $validatorFactory = new ConstraintValidatorFactory(); + + return new LegacyValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidatorLegacyApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidatorLegacyApiTest.php new file mode 100644 index 0000000..0b51a11 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidatorLegacyApiTest.php @@ -0,0 +1,35 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use Symfony\Component\Translation\IdentityTranslator; +use Symfony\Component\Validator\ConstraintValidatorFactory; +use Symfony\Component\Validator\Context\LegacyExecutionContextFactory; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\Validator\LegacyValidator; + +/** + * @group legacy + */ +class LegacyValidatorLegacyApiTest extends AbstractLegacyApiTest +{ + protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) + { + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $contextFactory = new LegacyExecutionContextFactory($metadataFactory, $translator); + $validatorFactory = new ConstraintValidatorFactory(); + + return new LegacyValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php new file mode 100644 index 0000000..1313fb9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php @@ -0,0 +1,57 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use Symfony\Component\Translation\IdentityTranslator; +use Symfony\Component\Validator\ConstraintValidatorFactory; +use Symfony\Component\Validator\Context\ExecutionContextFactory; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Validator\RecursiveValidator; + +class RecursiveValidator2Dot5ApiTest extends Abstract2Dot5ApiTest +{ + protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) + { + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $contextFactory = new ExecutionContextFactory($translator); + $validatorFactory = new ConstraintValidatorFactory(); + + return new RecursiveValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers); + } + + public function testEmptyGroupsArrayDoesNotTriggerDeprecation() + { + $entity = new Entity(); + + $validatorContext = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); + $validatorContext + ->expects($this->once()) + ->method('validate') + ->with($entity, null, array()) + ->willReturnSelf(); + + $validator = $this + ->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator') + ->disableOriginalConstructor() + ->setMethods(array('startContext')) + ->getMock(); + $validator + ->expects($this->once()) + ->method('startContext') + ->willReturn($validatorContext); + + $validator->validate($entity, null, array()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/ValidatorBuilderTest.php b/public/system/storage/vendor/symfony/validator/Tests/ValidatorBuilderTest.php new file mode 100644 index 0000000..77d5864 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/ValidatorBuilderTest.php @@ -0,0 +1,117 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\ValidatorBuilder; +use Symfony\Component\Validator\ValidatorBuilderInterface; + +class ValidatorBuilderTest extends TestCase +{ + /** + * @var ValidatorBuilderInterface + */ + protected $builder; + + protected function setUp() + { + $this->builder = new ValidatorBuilder(); + } + + protected function tearDown() + { + $this->builder = null; + } + + public function testAddObjectInitializer() + { + $this->assertSame($this->builder, $this->builder->addObjectInitializer( + $this->getMockBuilder('Symfony\Component\Validator\ObjectInitializerInterface')->getMock() + )); + } + + public function testAddObjectInitializers() + { + $this->assertSame($this->builder, $this->builder->addObjectInitializers(array())); + } + + public function testAddXmlMapping() + { + $this->assertSame($this->builder, $this->builder->addXmlMapping('mapping')); + } + + public function testAddXmlMappings() + { + $this->assertSame($this->builder, $this->builder->addXmlMappings(array())); + } + + public function testAddYamlMapping() + { + $this->assertSame($this->builder, $this->builder->addYamlMapping('mapping')); + } + + public function testAddYamlMappings() + { + $this->assertSame($this->builder, $this->builder->addYamlMappings(array())); + } + + public function testAddMethodMapping() + { + $this->assertSame($this->builder, $this->builder->addMethodMapping('mapping')); + } + + public function testAddMethodMappings() + { + $this->assertSame($this->builder, $this->builder->addMethodMappings(array())); + } + + public function testEnableAnnotationMapping() + { + $this->assertSame($this->builder, $this->builder->enableAnnotationMapping()); + } + + public function testDisableAnnotationMapping() + { + $this->assertSame($this->builder, $this->builder->disableAnnotationMapping()); + } + + public function testSetMetadataCache() + { + $this->assertSame($this->builder, $this->builder->setMetadataCache( + $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock()) + ); + } + + public function testSetConstraintValidatorFactory() + { + $this->assertSame($this->builder, $this->builder->setConstraintValidatorFactory( + $this->getMockBuilder('Symfony\Component\Validator\ConstraintValidatorFactoryInterface')->getMock()) + ); + } + + public function testSetTranslator() + { + $this->assertSame($this->builder, $this->builder->setTranslator( + $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock()) + ); + } + + public function testSetTranslationDomain() + { + $this->assertSame($this->builder, $this->builder->setTranslationDomain('TRANS_DOMAIN')); + } + + public function testGetValidator() + { + $this->assertInstanceOf('Symfony\Component\Validator\Validator\RecursiveValidator', $this->builder->getValidator()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Util/PropertyPath.php b/public/system/storage/vendor/symfony/validator/Util/PropertyPath.php new file mode 100644 index 0000000..4108a02 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Util/PropertyPath.php @@ -0,0 +1,56 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Util; + +/** + * Contains utility methods for dealing with property paths. + * + * For more extensive functionality, use Symfony's PropertyAccess component. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class PropertyPath +{ + /** + * Appends a path to a given property path. + * + * If the base path is empty, the appended path will be returned unchanged. + * If the base path is not empty, and the appended path starts with a + * squared opening bracket ("["), the concatenation of the two paths is + * returned. Otherwise, the concatenation of the two paths is returned, + * separated by a dot ("."). + * + * @param string $basePath The base path + * @param string $subPath The path to append + * + * @return string The concatenation of the two property paths + */ + public static function append($basePath, $subPath) + { + if ('' !== (string) $subPath) { + if ('[' === $subPath[0]) { + return $basePath.$subPath; + } + + return '' !== (string) $basePath ? $basePath.'.'.$subPath : $subPath; + } + + return $basePath; + } + + /** + * Not instantiable. + */ + private function __construct() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Validation.php b/public/system/storage/vendor/symfony/validator/Validation.php new file mode 100644 index 0000000..a469b47 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validation.php @@ -0,0 +1,68 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Entry point for the Validator component. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +final class Validation +{ + /** + * The Validator API provided by Symfony 2.4 and older. + * + * @deprecated use API_VERSION_2_5_BC instead + */ + const API_VERSION_2_4 = 1; + + /** + * The Validator API provided by Symfony 2.5 and newer. + */ + const API_VERSION_2_5 = 2; + + /** + * The Validator API provided by Symfony 2.5 and newer with a backwards + * compatibility layer for 2.4 and older. + */ + const API_VERSION_2_5_BC = 3; + + /** + * Creates a new validator. + * + * If you want to configure the validator, use + * {@link createValidatorBuilder()} instead. + * + * @return ValidatorInterface The new validator + */ + public static function createValidator() + { + return self::createValidatorBuilder()->getValidator(); + } + + /** + * Creates a configurable builder for validator objects. + * + * @return ValidatorBuilderInterface The new builder + */ + public static function createValidatorBuilder() + { + return new ValidatorBuilder(); + } + + /** + * This class cannot be instantiated. + */ + private function __construct() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/ValidationVisitor.php b/public/system/storage/vendor/symfony/validator/ValidationVisitor.php new file mode 100644 index 0000000..14fd88b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidationVisitor.php @@ -0,0 +1,181 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +@trigger_error('The '.__NAMESPACE__.'\ValidationVisitor class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Default implementation of {@link ValidationVisitorInterface} and + * {@link GlobalExecutionContextInterface}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + */ +class ValidationVisitor implements ValidationVisitorInterface, GlobalExecutionContextInterface +{ + private $root; + private $metadataFactory; + private $validatorFactory; + private $translator; + private $translationDomain; + private $objectInitializers; + private $violations; + private $validatedObjects = array(); + + /** + * Creates a new validation visitor. + * + * @param mixed $root The value passed to the validator + * @param MetadataFactoryInterface $metadataFactory The factory for obtaining metadata instances + * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating constraint validators + * @param TranslatorInterface $translator The translator for translating violation messages + * @param string|null $translationDomain The domain of the translation messages + * @param ObjectInitializerInterface[] $objectInitializers The initializers for preparing objects before validation + * + * @throws UnexpectedTypeException If any of the object initializers is not an instance of ObjectInitializerInterface + */ + public function __construct($root, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, $translationDomain = null, array $objectInitializers = array()) + { + foreach ($objectInitializers as $initializer) { + if (!$initializer instanceof ObjectInitializerInterface) { + throw new UnexpectedTypeException($initializer, 'Symfony\Component\Validator\ObjectInitializerInterface'); + } + } + + $this->root = $root; + $this->metadataFactory = $metadataFactory; + $this->validatorFactory = $validatorFactory; + $this->translator = $translator; + $this->translationDomain = $translationDomain; + $this->objectInitializers = $objectInitializers; + $this->violations = new ConstraintViolationList(); + } + + /** + * {@inheritdoc} + */ + public function visit(MetadataInterface $metadata, $value, $group, $propertyPath) + { + $context = new ExecutionContext( + $this, + $this->translator, + $this->translationDomain, + $metadata, + $value, + $group, + $propertyPath + ); + + $context->validateValue($value, $metadata->findConstraints($group)); + } + + /** + * {@inheritdoc} + */ + public function validate($value, $group, $propertyPath, $traverse = false, $deep = false) + { + if (null === $value) { + return; + } + + if (\is_object($value)) { + $hash = spl_object_hash($value); + + // Exit, if the object is already validated for the current group + if (isset($this->validatedObjects[$hash][$group])) { + return; + } + + // Initialize if the object wasn't initialized before + if (!isset($this->validatedObjects[$hash])) { + foreach ($this->objectInitializers as $initializer) { + if (!$initializer instanceof ObjectInitializerInterface) { + throw new \LogicException('Validator initializers must implement ObjectInitializerInterface.'); + } + $initializer->initialize($value); + } + } + + // Remember validating this object before starting and possibly + // traversing the object graph + $this->validatedObjects[$hash][$group] = true; + } + + // Validate arrays recursively by default, otherwise every driver needs + // to implement special handling for arrays. + // https://github.com/symfony/symfony/issues/6246 + if (\is_array($value) || ($traverse && $value instanceof \Traversable)) { + foreach ($value as $key => $element) { + // Ignore any scalar values in the collection + if (\is_object($element) || \is_array($element)) { + // Only repeat the traversal if $deep is set + $this->validate($element, $group, $propertyPath.'['.$key.']', $deep, $deep); + } + } + + try { + $this->metadataFactory->getMetadataFor($value)->accept($this, $value, $group, $propertyPath); + } catch (NoSuchMetadataException $e) { + // Metadata doesn't necessarily have to exist for + // traversable objects, because we know how to validate + // them anyway. Optionally, additional metadata is supported. + } + } else { + $this->metadataFactory->getMetadataFor($value)->accept($this, $value, $group, $propertyPath); + } + } + + /** + * {@inheritdoc} + */ + public function getViolations() + { + return $this->violations; + } + + /** + * {@inheritdoc} + */ + public function getRoot() + { + return $this->root; + } + + /** + * {@inheritdoc} + */ + public function getVisitor() + { + return $this; + } + + /** + * {@inheritdoc} + */ + public function getValidatorFactory() + { + return $this->validatorFactory; + } + + /** + * {@inheritdoc} + */ + public function getMetadataFactory() + { + return $this->metadataFactory; + } +} diff --git a/public/system/storage/vendor/symfony/validator/ValidationVisitorInterface.php b/public/system/storage/vendor/symfony/validator/ValidationVisitorInterface.php new file mode 100644 index 0000000..28d4921 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidationVisitorInterface.php @@ -0,0 +1,82 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Validates values against constraints defined in {@link MetadataInterface} + * instances. + * + * This interface is an implementation of the Visitor design pattern. A value + * is validated by first passing it to the {@link validate} method. That method + * will determine the matching {@link MetadataInterface} for validating the + * value. It then calls the {@link MetadataInterface::accept} method of that + * metadata. <tt>accept()</tt> does two things: + * + * <ol> + * <li>It calls {@link visit} to validate the value against the constraints of + * the metadata.</li> + * <li>It calls <tt>accept()</tt> on all nested metadata instances with the + * corresponding values extracted from the current value. For example, if the + * current metadata represents a class and the current value is an object of + * that class, the metadata contains nested instances for each property of that + * class. It forwards the call to these nested metadata with the values of the + * corresponding properties in the original object.</li> + * </ol> + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + */ +interface ValidationVisitorInterface +{ + /** + * Validates a value. + * + * If the value is an array or a traversable object, you can set the + * parameter <tt>$traverse</tt> to <tt>true</tt> in order to run through + * the collection and validate each element. If these elements can be + * collections again and you want to traverse them recursively, set the + * parameter <tt>$deep</tt> to <tt>true</tt> as well. + * + * If you set <tt>$traversable</tt> to <tt>true</tt>, the visitor will + * nevertheless try to find metadata for the collection and validate its + * constraints. If no such metadata is found, the visitor ignores that and + * only iterates the collection. + * + * If you don't set <tt>$traversable</tt> to <tt>true</tt> and the visitor + * does not find metadata for the given value, it will fail with an + * exception. + * + * @param mixed $value The value to validate + * @param string $group The validation group to validate + * @param string $propertyPath The current property path in the validation graph + * @param bool $traverse Whether to traverse the value if it is traversable + * @param bool $deep Whether to traverse nested traversable values recursively + * + * @throws Exception\NoSuchMetadataException if no metadata can be found for + * the given value + */ + public function validate($value, $group, $propertyPath, $traverse = false, $deep = false); + + /** + * Validates a value against the constraints defined in some metadata. + * + * This method implements the Visitor design pattern. See also + * {@link ValidationVisitorInterface}. + * + * @param MetadataInterface $metadata The metadata holding the constraints + * @param mixed $value The value to validate + * @param string $group The validation group to validate + * @param string $propertyPath The current property path in the validation graph + */ + public function visit(MetadataInterface $metadata, $value, $group, $propertyPath); +} diff --git a/public/system/storage/vendor/symfony/validator/Validator.php b/public/system/storage/vendor/symfony/validator/Validator.php new file mode 100644 index 0000000..1aa5fd1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator.php @@ -0,0 +1,208 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +@trigger_error('The '.__NAMESPACE__.'\Validator class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Validator\RecursiveValidator class instead.', E_USER_DEPRECATED); + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Exception\ValidatorException; + +/** + * Default implementation of {@link ValidatorInterface}. + * + * @author Fabien Potencier <fabien@symfony.com> + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Validator\RecursiveValidator} instead. + */ +class Validator implements ValidatorInterface, Mapping\Factory\MetadataFactoryInterface +{ + private $metadataFactory; + private $validatorFactory; + private $translator; + private $translationDomain; + private $objectInitializers; + + public function __construct(MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, $translationDomain = 'validators', array $objectInitializers = array()) + { + $this->metadataFactory = $metadataFactory; + $this->validatorFactory = $validatorFactory; + $this->translator = $translator; + $this->translationDomain = $translationDomain; + $this->objectInitializers = $objectInitializers; + } + + /** + * {@inheritdoc} + */ + public function getMetadataFactory() + { + return $this->metadataFactory; + } + + /** + * {@inheritdoc} + */ + public function getMetadataFor($value) + { + return $this->metadataFactory->getMetadataFor($value); + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($value) + { + return $this->metadataFactory->hasMetadataFor($value); + } + + /** + * {@inheritdoc} + */ + public function validate($value, $groups = null, $traverse = false, $deep = false) + { + $visitor = $this->createVisitor($value); + + foreach ($this->resolveGroups($groups) as $group) { + $visitor->validate($value, $group, '', $traverse, $deep); + } + + return $visitor->getViolations(); + } + + /** + * {@inheritdoc} + * + * @throws ValidatorException if the metadata for the value does not support properties + */ + public function validateProperty($containingValue, $property, $groups = null) + { + $visitor = $this->createVisitor($containingValue); + $metadata = $this->metadataFactory->getMetadataFor($containingValue); + + if (!$metadata instanceof PropertyMetadataContainerInterface) { + $valueAsString = is_scalar($containingValue) + ? '"'.$containingValue.'"' + : 'the value of type '.\gettype($containingValue); + + throw new ValidatorException(sprintf('The metadata for %s does not support properties.', $valueAsString)); + } + + foreach ($this->resolveGroups($groups) as $group) { + if (!$metadata->hasPropertyMetadata($property)) { + continue; + } + + foreach ($metadata->getPropertyMetadata($property) as $propMeta) { + $propMeta->accept($visitor, $propMeta->getPropertyValue($containingValue), $group, $property); + } + } + + return $visitor->getViolations(); + } + + /** + * {@inheritdoc} + * + * @throws ValidatorException if the metadata for the value does not support properties + */ + public function validatePropertyValue($containingValue, $property, $value, $groups = null) + { + $visitor = $this->createVisitor(\is_object($containingValue) ? $containingValue : $value); + $metadata = $this->metadataFactory->getMetadataFor($containingValue); + + if (!$metadata instanceof PropertyMetadataContainerInterface) { + $valueAsString = is_scalar($containingValue) + ? '"'.$containingValue.'"' + : 'the value of type '.\gettype($containingValue); + + throw new ValidatorException(sprintf('The metadata for %s does not support properties.', $valueAsString)); + } + + // If $containingValue is passed as class name, take $value as root + // and start the traversal with an empty property path + $propertyPath = \is_object($containingValue) ? $property : ''; + + foreach ($this->resolveGroups($groups) as $group) { + if (!$metadata->hasPropertyMetadata($property)) { + continue; + } + + foreach ($metadata->getPropertyMetadata($property) as $propMeta) { + $propMeta->accept($visitor, $value, $group, $propertyPath); + } + } + + return $visitor->getViolations(); + } + + /** + * {@inheritdoc} + */ + public function validateValue($value, $constraints, $groups = null) + { + $context = new ExecutionContext($this->createVisitor($value), $this->translator, $this->translationDomain); + + $constraints = \is_array($constraints) ? $constraints : array($constraints); + + foreach ($constraints as $constraint) { + if ($constraint instanceof Valid) { + // Why can't the Valid constraint be executed directly? + // + // It cannot be executed like regular other constraints, because regular + // constraints are only executed *if they belong to the validated group*. + // The Valid constraint, on the other hand, is always executed and propagates + // the group to the cascaded object. The propagated group depends on + // + // * Whether a group sequence is currently being executed. Then the default + // group is propagated. + // + // * Otherwise the validated group is propagated. + + throw new ValidatorException(sprintf('The constraint %s cannot be validated. Use the method validate() instead.', \get_class($constraint))); + } + + $context->validateValue($value, $constraint, '', $groups); + } + + return $context->getViolations(); + } + + /** + * @param mixed $root + * + * @return ValidationVisitor + */ + private function createVisitor($root) + { + return new ValidationVisitor( + $root, + $this->metadataFactory, + $this->validatorFactory, + $this->translator, + $this->translationDomain, + $this->objectInitializers + ); + } + + /** + * @param string|string[]|null $groups + * + * @return string[] + */ + private function resolveGroups($groups) + { + return $groups ? (array) $groups : array(Constraint::DEFAULT_GROUP); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/ContextualValidatorInterface.php b/public/system/storage/vendor/symfony/validator/Validator/ContextualValidatorInterface.php new file mode 100644 index 0000000..c8b545b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/ContextualValidatorInterface.php @@ -0,0 +1,83 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\ConstraintViolationListInterface; + +/** + * A validator in a specific execution context. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ContextualValidatorInterface +{ + /** + * Appends the given path to the property path of the context. + * + * If called multiple times, the path will always be reset to the context's + * original path with the given path appended to it. + * + * @param string $path The path to append + * + * @return $this + */ + public function atPath($path); + + /** + * Validates a value against a constraint or a list of constraints. + * + * If no constraint is passed, the constraint + * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. + * + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed + * + * @return $this + */ + public function validate($value, $constraints = null, $groups = null); + + /** + * Validates a property of an object against the constraints specified + * for this property. + * + * @param object $object The object + * @param string $propertyName The name of the validated property + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed + * + * @return $this + */ + public function validateProperty($object, $propertyName, $groups = null); + + /** + * Validates a value against the constraints specified for an object's + * property. + * + * @param object|string $objectOrClass The object or its class name + * @param string $propertyName The name of the property + * @param mixed $value The value to validate against the property's constraints + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed + * + * @return $this + */ + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null); + + /** + * Returns the violations that have been generated so far in the context + * of the validator. + * + * @return ConstraintViolationListInterface The constraint violations + */ + public function getViolations(); +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/LegacyValidator.php b/public/system/storage/vendor/symfony/validator/Validator/LegacyValidator.php new file mode 100644 index 0000000..c4d818b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/LegacyValidator.php @@ -0,0 +1,27 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +@trigger_error('The '.__NAMESPACE__.'\LegacyValidator class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + +/** + * A validator that supports both the API of Symfony < 2.5 and Symfony 2.5+. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @see \Symfony\Component\Validator\ValidatorInterface + * @see \Symfony\Component\Validator\Validator\ValidatorInterface + * @deprecated since version 2.5, to be removed in 3.0. + */ +class LegacyValidator extends RecursiveValidator +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/RecursiveContextualValidator.php b/public/system/storage/vendor/symfony/validator/Validator/RecursiveContextualValidator.php new file mode 100644 index 0000000..14456d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/RecursiveContextualValidator.php @@ -0,0 +1,831 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; +use Symfony\Component\Validator\Context\ExecutionContext; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\Exception\RuntimeException; +use Symfony\Component\Validator\Exception\UnsupportedMetadataException; +use Symfony\Component\Validator\Exception\ValidatorException; +use Symfony\Component\Validator\Mapping\CascadingStrategy; +use Symfony\Component\Validator\Mapping\ClassMetadataInterface; +use Symfony\Component\Validator\Mapping\GenericMetadata; +use Symfony\Component\Validator\Mapping\MetadataInterface; +use Symfony\Component\Validator\Mapping\PropertyMetadataInterface; +use Symfony\Component\Validator\Mapping\TraversalStrategy; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\ObjectInitializerInterface; +use Symfony\Component\Validator\Util\PropertyPath; + +/** + * Recursive implementation of {@link ContextualValidatorInterface}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class RecursiveContextualValidator implements ContextualValidatorInterface +{ + private $context; + private $defaultPropertyPath; + private $defaultGroups; + private $metadataFactory; + private $validatorFactory; + private $objectInitializers; + + /** + * Creates a validator for the given context. + * + * @param ExecutionContextInterface $context The execution context + * @param MetadataFactoryInterface $metadataFactory The factory for + * fetching the metadata + * of validated objects + * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating + * constraint validators + * @param ObjectInitializerInterface[] $objectInitializers The object initializers + */ + public function __construct(ExecutionContextInterface $context, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) + { + $this->context = $context; + $this->defaultPropertyPath = $context->getPropertyPath(); + $this->defaultGroups = array($context->getGroup() ?: Constraint::DEFAULT_GROUP); + $this->metadataFactory = $metadataFactory; + $this->validatorFactory = $validatorFactory; + $this->objectInitializers = $objectInitializers; + } + + /** + * {@inheritdoc} + */ + public function atPath($path) + { + $this->defaultPropertyPath = $this->context->getPropertyPath($path); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validate($value, $constraints = null, $groups = null) + { + $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; + + $previousValue = $this->context->getValue(); + $previousObject = $this->context->getObject(); + $previousMetadata = $this->context->getMetadata(); + $previousPath = $this->context->getPropertyPath(); + $previousGroup = $this->context->getGroup(); + $previousConstraint = null; + + if ($this->context instanceof ExecutionContext || method_exists($this->context, 'getConstraint')) { + $previousConstraint = $this->context->getConstraint(); + } + + // If explicit constraints are passed, validate the value against + // those constraints + if (null !== $constraints) { + // You can pass a single constraint or an array of constraints + // Make sure to deal with an array in the rest of the code + if (!\is_array($constraints)) { + $constraints = array($constraints); + } + + $metadata = new GenericMetadata(); + $metadata->addConstraints($constraints); + + $this->validateGenericNode( + $value, + $previousObject, + \is_object($value) ? spl_object_hash($value) : null, + $metadata, + $this->defaultPropertyPath, + $groups, + null, + TraversalStrategy::IMPLICIT, + $this->context + ); + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + if (null !== $previousConstraint) { + $this->context->setConstraint($previousConstraint); + } + + return $this; + } + + // If an object is passed without explicit constraints, validate that + // object against the constraints defined for the object's class + if (\is_object($value)) { + $this->validateObject( + $value, + $this->defaultPropertyPath, + $groups, + TraversalStrategy::IMPLICIT, + $this->context + ); + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + return $this; + } + + // If an array is passed without explicit constraints, validate each + // object in the array + if (\is_array($value)) { + $this->validateEachObjectIn( + $value, + $this->defaultPropertyPath, + $groups, + true, + $this->context + ); + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + return $this; + } + + throw new RuntimeException(sprintf('Cannot validate values of type "%s" automatically. Please provide a constraint.', \gettype($value))); + } + + /** + * {@inheritdoc} + */ + public function validateProperty($object, $propertyName, $groups = null) + { + $classMetadata = $this->metadataFactory->getMetadataFor($object); + + if (!$classMetadata instanceof ClassMetadataInterface) { + // Cannot be UnsupportedMetadataException because of BC with + // Symfony < 2.5 + throw new ValidatorException(sprintf('The metadata factory should return instances of "\Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".', \is_object($classMetadata) ? \get_class($classMetadata) : \gettype($classMetadata))); + } + + $propertyMetadatas = $classMetadata->getPropertyMetadata($propertyName); + $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; + $cacheKey = spl_object_hash($object); + $propertyPath = PropertyPath::append($this->defaultPropertyPath, $propertyName); + + $previousValue = $this->context->getValue(); + $previousObject = $this->context->getObject(); + $previousMetadata = $this->context->getMetadata(); + $previousPath = $this->context->getPropertyPath(); + $previousGroup = $this->context->getGroup(); + + foreach ($propertyMetadatas as $propertyMetadata) { + $propertyValue = $propertyMetadata->getPropertyValue($object); + + $this->validateGenericNode( + $propertyValue, + $object, + $cacheKey.':'.$propertyName, + $propertyMetadata, + $propertyPath, + $groups, + null, + TraversalStrategy::IMPLICIT, + $this->context + ); + } + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null) + { + $classMetadata = $this->metadataFactory->getMetadataFor($objectOrClass); + + if (!$classMetadata instanceof ClassMetadataInterface) { + // Cannot be UnsupportedMetadataException because of BC with + // Symfony < 2.5 + throw new ValidatorException(sprintf('The metadata factory should return instances of "\Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".', \is_object($classMetadata) ? \get_class($classMetadata) : \gettype($classMetadata))); + } + + $propertyMetadatas = $classMetadata->getPropertyMetadata($propertyName); + $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; + + if (\is_object($objectOrClass)) { + $object = $objectOrClass; + $cacheKey = spl_object_hash($objectOrClass); + $propertyPath = PropertyPath::append($this->defaultPropertyPath, $propertyName); + } else { + // $objectOrClass contains a class name + $object = null; + $cacheKey = null; + $propertyPath = $this->defaultPropertyPath; + } + + $previousValue = $this->context->getValue(); + $previousObject = $this->context->getObject(); + $previousMetadata = $this->context->getMetadata(); + $previousPath = $this->context->getPropertyPath(); + $previousGroup = $this->context->getGroup(); + + foreach ($propertyMetadatas as $propertyMetadata) { + $this->validateGenericNode( + $value, + $object, + $cacheKey.':'.$propertyName, + $propertyMetadata, + $propertyPath, + $groups, + null, + TraversalStrategy::IMPLICIT, + $this->context + ); + } + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getViolations() + { + return $this->context->getViolations(); + } + + /** + * Normalizes the given group or list of groups to an array. + * + * @param string|GroupSequence|(string|GroupSequence)[] $groups The groups to normalize + * + * @return (string|GroupSequence)[] A group array + */ + protected function normalizeGroups($groups) + { + if (\is_array($groups)) { + return $groups; + } + + return array($groups); + } + + /** + * Validates an object against the constraints defined for its class. + * + * If no metadata is available for the class, but the class is an instance + * of {@link \Traversable} and the selected traversal strategy allows + * traversal, the object will be iterated and each nested object will be + * validated instead. + * + * @param object $object The object to cascade + * @param string $propertyPath The current property path + * @param (string|GroupSequence)[] $groups The validated groups + * @param int $traversalStrategy The strategy for traversing the + * cascaded object + * @param ExecutionContextInterface $context The current execution context + * + * @throws NoSuchMetadataException If the object has no associated metadata + * and does not implement {@link \Traversable} + * or if traversal is disabled via the + * $traversalStrategy argument + * @throws UnsupportedMetadataException If the metadata returned by the + * metadata factory does not implement + * {@link ClassMetadataInterface} + */ + private function validateObject($object, $propertyPath, array $groups, $traversalStrategy, ExecutionContextInterface $context) + { + try { + $classMetadata = $this->metadataFactory->getMetadataFor($object); + + if (!$classMetadata instanceof ClassMetadataInterface) { + throw new UnsupportedMetadataException(sprintf('The metadata factory should return instances of "Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".', \is_object($classMetadata) ? \get_class($classMetadata) : \gettype($classMetadata))); + } + + $this->validateClassNode( + $object, + spl_object_hash($object), + $classMetadata, + $propertyPath, + $groups, + null, + $traversalStrategy, + $context + ); + } catch (NoSuchMetadataException $e) { + // Rethrow if not Traversable + if (!$object instanceof \Traversable) { + throw $e; + } + + // Rethrow unless IMPLICIT or TRAVERSE + if (!($traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE))) { + throw $e; + } + + $this->validateEachObjectIn( + $object, + $propertyPath, + $groups, + $traversalStrategy & TraversalStrategy::STOP_RECURSION, + $context + ); + } + } + + /** + * Validates each object in a collection against the constraints defined + * for their classes. + * + * If the parameter $recursive is set to true, nested {@link \Traversable} + * objects are iterated as well. Nested arrays are always iterated, + * regardless of the value of $recursive. + * + * @param iterable $collection The collection + * @param string $propertyPath The current property path + * @param (string|GroupSequence)[] $groups The validated groups + * @param bool $stopRecursion Whether to disable + * recursive iteration. For + * backwards compatibility + * with Symfony < 2.5. + * @param ExecutionContextInterface $context The current execution context + * + * @see ClassNode + * @see CollectionNode + */ + private function validateEachObjectIn($collection, $propertyPath, array $groups, $stopRecursion, ExecutionContextInterface $context) + { + if ($stopRecursion) { + $traversalStrategy = TraversalStrategy::NONE; + } else { + $traversalStrategy = TraversalStrategy::IMPLICIT; + } + + foreach ($collection as $key => $value) { + if (\is_array($value)) { + // Arrays are always cascaded, independent of the specified + // traversal strategy + // (BC with Symfony < 2.5) + $this->validateEachObjectIn( + $value, + $propertyPath.'['.$key.']', + $groups, + $stopRecursion, + $context + ); + + continue; + } + + // Scalar and null values in the collection are ignored + // (BC with Symfony < 2.5) + if (\is_object($value)) { + $this->validateObject( + $value, + $propertyPath.'['.$key.']', + $groups, + $traversalStrategy, + $context + ); + } + } + } + + /** + * Validates a class node. + * + * A class node is a combination of an object with a {@link ClassMetadataInterface} + * instance. Each class node (conceptionally) has zero or more succeeding + * property nodes: + * + * (Article:class node) + * \ + * ($title:property node) + * + * This method validates the passed objects against all constraints defined + * at class level. It furthermore triggers the validation of each of the + * class' properties against the constraints for that property. + * + * If the selected traversal strategy allows traversal, the object is + * iterated and each nested object is validated against its own constraints. + * The object is not traversed if traversal is disabled in the class + * metadata. + * + * If the passed groups contain the group "Default", the validator will + * check whether the "Default" group has been replaced by a group sequence + * in the class metadata. If this is the case, the group sequence is + * validated instead. + * + * @param object $object The validated object + * @param string $cacheKey The key for caching + * the validated object + * @param ClassMetadataInterface $metadata The class metadata of + * the object + * @param string $propertyPath The property path leading + * to the object + * @param (string|GroupSequence)[] $groups The groups in which the + * object should be validated + * @param string[]|null $cascadedGroups The groups in which + * cascaded objects should + * be validated + * @param int $traversalStrategy The strategy used for + * traversing the object + * @param ExecutionContextInterface $context The current execution context + * + * @throws UnsupportedMetadataException If a property metadata does not + * implement {@link PropertyMetadataInterface} + * @throws ConstraintDefinitionException If traversal was enabled but the + * object does not implement + * {@link \Traversable} + * + * @see TraversalStrategy + */ + private function validateClassNode($object, $cacheKey, ClassMetadataInterface $metadata = null, $propertyPath, array $groups, $cascadedGroups, $traversalStrategy, ExecutionContextInterface $context) + { + $context->setNode($object, $object, $metadata, $propertyPath); + + if (!$context->isObjectInitialized($cacheKey)) { + foreach ($this->objectInitializers as $initializer) { + $initializer->initialize($object); + } + + $context->markObjectAsInitialized($cacheKey); + } + + foreach ($groups as $key => $group) { + // If the "Default" group is replaced by a group sequence, remember + // to cascade the "Default" group when traversing the group + // sequence + $defaultOverridden = false; + + // Use the object hash for group sequences + $groupHash = \is_object($group) ? spl_object_hash($group) : $group; + + if ($context->isGroupValidated($cacheKey, $groupHash)) { + // Skip this group when validating the properties and when + // traversing the object + unset($groups[$key]); + + continue; + } + + $context->markGroupAsValidated($cacheKey, $groupHash); + + // Replace the "Default" group by the group sequence defined + // for the class, if applicable. + // This is done after checking the cache, so that + // spl_object_hash() isn't called for this sequence and + // "Default" is used instead in the cache. This is useful + // if the getters below return different group sequences in + // every call. + if (Constraint::DEFAULT_GROUP === $group) { + if ($metadata->hasGroupSequence()) { + // The group sequence is statically defined for the class + $group = $metadata->getGroupSequence(); + $defaultOverridden = true; + } elseif ($metadata->isGroupSequenceProvider()) { + // The group sequence is dynamically obtained from the validated + // object + /* @var \Symfony\Component\Validator\GroupSequenceProviderInterface $object */ + $group = $object->getGroupSequence(); + $defaultOverridden = true; + + if (!$group instanceof GroupSequence) { + $group = new GroupSequence($group); + } + } + } + + // If the groups (=[<G1,G2>,G3,G4]) contain a group sequence + // (=<G1,G2>), then call validateClassNode() with each entry of the + // group sequence and abort if necessary (G1, G2) + if ($group instanceof GroupSequence) { + $this->stepThroughGroupSequence( + $object, + $object, + $cacheKey, + $metadata, + $propertyPath, + $traversalStrategy, + $group, + $defaultOverridden ? Constraint::DEFAULT_GROUP : null, + $context + ); + + // Skip the group sequence when validating properties, because + // stepThroughGroupSequence() already validates the properties + unset($groups[$key]); + + continue; + } + + $this->validateInGroup($object, $cacheKey, $metadata, $group, $context); + } + + // If no more groups should be validated for the property nodes, + // we can safely quit + if (0 === \count($groups)) { + return; + } + + // Validate all properties against their constraints + foreach ($metadata->getConstrainedProperties() as $propertyName) { + // If constraints are defined both on the getter of a property as + // well as on the property itself, then getPropertyMetadata() + // returns two metadata objects, not just one + foreach ($metadata->getPropertyMetadata($propertyName) as $propertyMetadata) { + if (!$propertyMetadata instanceof PropertyMetadataInterface) { + throw new UnsupportedMetadataException(sprintf('The property metadata instances should implement "Symfony\Component\Validator\Mapping\PropertyMetadataInterface", got: "%s".', \is_object($propertyMetadata) ? \get_class($propertyMetadata) : \gettype($propertyMetadata))); + } + + $propertyValue = $propertyMetadata->getPropertyValue($object); + + $this->validateGenericNode( + $propertyValue, + $object, + $cacheKey.':'.$propertyName, + $propertyMetadata, + PropertyPath::append($propertyPath, $propertyName), + $groups, + $cascadedGroups, + TraversalStrategy::IMPLICIT, + $context + ); + } + } + + // If no specific traversal strategy was requested when this method + // was called, use the traversal strategy of the class' metadata + if ($traversalStrategy & TraversalStrategy::IMPLICIT) { + // Keep the STOP_RECURSION flag, if it was set + $traversalStrategy = $metadata->getTraversalStrategy() + | ($traversalStrategy & TraversalStrategy::STOP_RECURSION); + } + + // Traverse only if IMPLICIT or TRAVERSE + if (!($traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE))) { + return; + } + + // If IMPLICIT, stop unless we deal with a Traversable + if ($traversalStrategy & TraversalStrategy::IMPLICIT && !$object instanceof \Traversable) { + return; + } + + // If TRAVERSE, fail if we have no Traversable + if (!$object instanceof \Traversable) { + // Must throw a ConstraintDefinitionException for backwards + // compatibility reasons with Symfony < 2.5 + throw new ConstraintDefinitionException(sprintf('Traversal was enabled for "%s", but this class does not implement "\Traversable".', \get_class($object))); + } + + $this->validateEachObjectIn( + $object, + $propertyPath, + $groups, + $traversalStrategy & TraversalStrategy::STOP_RECURSION, + $context + ); + } + + /** + * Validates a node that is not a class node. + * + * Currently, two such node types exist: + * + * - property nodes, which consist of the value of an object's + * property together with a {@link PropertyMetadataInterface} instance + * - generic nodes, which consist of a value and some arbitrary + * constraints defined in a {@link MetadataInterface} container + * + * In both cases, the value is validated against all constraints defined + * in the passed metadata object. Then, if the value is an instance of + * {@link \Traversable} and the selected traversal strategy permits it, + * the value is traversed and each nested object validated against its own + * constraints. Arrays are always traversed. + * + * @param mixed $value The validated value + * @param object|null $object The current object + * @param string $cacheKey The key for caching + * the validated value + * @param MetadataInterface $metadata The metadata of the + * value + * @param string $propertyPath The property path leading + * to the value + * @param (string|GroupSequence)[] $groups The groups in which the + * value should be validated + * @param string[]|null $cascadedGroups The groups in which + * cascaded objects should + * be validated + * @param int $traversalStrategy The strategy used for + * traversing the value + * @param ExecutionContextInterface $context The current execution context + * + * @see TraversalStrategy + */ + private function validateGenericNode($value, $object, $cacheKey, MetadataInterface $metadata = null, $propertyPath, array $groups, $cascadedGroups, $traversalStrategy, ExecutionContextInterface $context) + { + $context->setNode($value, $object, $metadata, $propertyPath); + + foreach ($groups as $key => $group) { + if ($group instanceof GroupSequence) { + $this->stepThroughGroupSequence( + $value, + $object, + $cacheKey, + $metadata, + $propertyPath, + $traversalStrategy, + $group, + null, + $context + ); + + // Skip the group sequence when cascading, as the cascading + // logic is already done in stepThroughGroupSequence() + unset($groups[$key]); + + continue; + } + + $this->validateInGroup($value, $cacheKey, $metadata, $group, $context); + } + + if (0 === \count($groups)) { + return; + } + + if (null === $value) { + return; + } + + $cascadingStrategy = $metadata->getCascadingStrategy(); + + // Quit unless we have an array or a cascaded object + if (!\is_array($value) && !($cascadingStrategy & CascadingStrategy::CASCADE)) { + return; + } + + // If no specific traversal strategy was requested when this method + // was called, use the traversal strategy of the node's metadata + if ($traversalStrategy & TraversalStrategy::IMPLICIT) { + // Keep the STOP_RECURSION flag, if it was set + $traversalStrategy = $metadata->getTraversalStrategy() + | ($traversalStrategy & TraversalStrategy::STOP_RECURSION); + } + + // The $cascadedGroups property is set, if the "Default" group is + // overridden by a group sequence + // See validateClassNode() + $cascadedGroups = null !== $cascadedGroups && \count($cascadedGroups) > 0 ? $cascadedGroups : $groups; + + if (\is_array($value)) { + // Arrays are always traversed, independent of the specified + // traversal strategy + // (BC with Symfony < 2.5) + $this->validateEachObjectIn( + $value, + $propertyPath, + $cascadedGroups, + $traversalStrategy & TraversalStrategy::STOP_RECURSION, + $context + ); + + return; + } + + // If the value is a scalar, pass it anyway, because we want + // a NoSuchMetadataException to be thrown in that case + // (BC with Symfony < 2.5) + $this->validateObject( + $value, + $propertyPath, + $cascadedGroups, + $traversalStrategy, + $context + ); + + // Currently, the traversal strategy can only be TRAVERSE for a + // generic node if the cascading strategy is CASCADE. Thus, traversable + // objects will always be handled within validateObject() and there's + // nothing more to do here. + + // see GenericMetadata::addConstraint() + } + + /** + * Sequentially validates a node's value in each group of a group sequence. + * + * If any of the constraints generates a violation, subsequent groups in the + * group sequence are skipped. + * + * @param mixed $value The validated value + * @param object|null $object The current object + * @param string $cacheKey The key for caching + * the validated value + * @param MetadataInterface $metadata The metadata of the + * value + * @param string $propertyPath The property path leading + * to the value + * @param int $traversalStrategy The strategy used for + * traversing the value + * @param GroupSequence $groupSequence The group sequence + * @param string|null $cascadedGroup The group that should + * be passed to cascaded + * objects instead of + * the group sequence + * @param ExecutionContextInterface $context The execution context + */ + private function stepThroughGroupSequence($value, $object, $cacheKey, MetadataInterface $metadata = null, $propertyPath, $traversalStrategy, GroupSequence $groupSequence, $cascadedGroup, ExecutionContextInterface $context) + { + $violationCount = \count($context->getViolations()); + $cascadedGroups = $cascadedGroup ? array($cascadedGroup) : null; + + foreach ($groupSequence->groups as $groupInSequence) { + $groups = array($groupInSequence); + + if ($metadata instanceof ClassMetadataInterface) { + $this->validateClassNode( + $value, + $cacheKey, + $metadata, + $propertyPath, + $groups, + $cascadedGroups, + $traversalStrategy, + $context + ); + } else { + $this->validateGenericNode( + $value, + $object, + $cacheKey, + $metadata, + $propertyPath, + $groups, + $cascadedGroups, + $traversalStrategy, + $context + ); + } + + // Abort sequence validation if a violation was generated + if (\count($context->getViolations()) > $violationCount) { + break; + } + } + } + + /** + * Validates a node's value against all constraints in the given group. + * + * @param mixed $value The validated value + * @param string $cacheKey The key for caching the + * validated value + * @param MetadataInterface $metadata The metadata of the value + * @param string $group The group to validate + * @param ExecutionContextInterface $context The execution context + */ + private function validateInGroup($value, $cacheKey, MetadataInterface $metadata, $group, ExecutionContextInterface $context) + { + $context->setGroup($group); + + foreach ($metadata->findConstraints($group) as $constraint) { + // Prevent duplicate validation of constraints, in the case + // that constraints belong to multiple validated groups + if (null !== $cacheKey) { + $constraintHash = spl_object_hash($constraint); + + if ($context->isConstraintValidated($cacheKey, $constraintHash)) { + continue; + } + + $context->markConstraintAsValidated($cacheKey, $constraintHash); + } + + $context->setConstraint($constraint); + + $validator = $this->validatorFactory->getInstance($constraint); + $validator->initialize($context); + $validator->validate($value, $constraint); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/RecursiveValidator.php b/public/system/storage/vendor/symfony/validator/Validator/RecursiveValidator.php new file mode 100644 index 0000000..bf0050d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/RecursiveValidator.php @@ -0,0 +1,171 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; +use Symfony\Component\Validator\Context\ExecutionContextFactoryInterface; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\ObjectInitializerInterface; +use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; + +/** + * Recursive implementation of {@link ValidatorInterface}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class RecursiveValidator implements ValidatorInterface, LegacyValidatorInterface +{ + protected $contextFactory; + protected $metadataFactory; + protected $validatorFactory; + protected $objectInitializers; + + /** + * Creates a new validator. + * + * @param ExecutionContextFactoryInterface $contextFactory The factory for + * creating new contexts + * @param MetadataFactoryInterface $metadataFactory The factory for + * fetching the metadata + * of validated objects + * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating + * constraint validators + * @param ObjectInitializerInterface[] $objectInitializers The object initializers + */ + public function __construct(ExecutionContextFactoryInterface $contextFactory, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) + { + $this->contextFactory = $contextFactory; + $this->metadataFactory = $metadataFactory; + $this->validatorFactory = $validatorFactory; + $this->objectInitializers = $objectInitializers; + } + + /** + * {@inheritdoc} + */ + public function startContext($root = null) + { + return new RecursiveContextualValidator( + $this->contextFactory->createContext($this, $root), + $this->metadataFactory, + $this->validatorFactory, + $this->objectInitializers + ); + } + + /** + * {@inheritdoc} + */ + public function inContext(ExecutionContextInterface $context) + { + return new RecursiveContextualValidator( + $context, + $this->metadataFactory, + $this->validatorFactory, + $this->objectInitializers + ); + } + + /** + * {@inheritdoc} + */ + public function getMetadataFor($object) + { + return $this->metadataFactory->getMetadataFor($object); + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($object) + { + return $this->metadataFactory->hasMetadataFor($object); + } + + /** + * {@inheritdoc} + */ + public function validate($value, $groups = null, $traverse = false, $deep = false) + { + $numArgs = \func_num_args(); + + // Use new signature if constraints are given in the second argument + if (self::testConstraints($groups) && ($numArgs < 3 || 3 === $numArgs && self::testGroups($traverse))) { + // Rename to avoid total confusion ;) + $constraints = $groups; + $groups = $traverse; + } else { + @trigger_error('The Symfony\Component\Validator\ValidatorInterface::validate method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::validate method instead.', E_USER_DEPRECATED); + + $constraints = new Valid(array('traverse' => $traverse, 'deep' => $deep)); + } + + return $this->startContext($value) + ->validate($value, $constraints, $groups) + ->getViolations(); + } + + /** + * {@inheritdoc} + */ + public function validateProperty($object, $propertyName, $groups = null) + { + return $this->startContext($object) + ->validateProperty($object, $propertyName, $groups) + ->getViolations(); + } + + /** + * {@inheritdoc} + */ + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null) + { + // If a class name is passed, take $value as root + return $this->startContext(\is_object($objectOrClass) ? $objectOrClass : $value) + ->validatePropertyValue($objectOrClass, $propertyName, $value, $groups) + ->getViolations(); + } + + /** + * {@inheritdoc} + */ + public function validateValue($value, $constraints, $groups = null) + { + @trigger_error('The '.__METHOD__.' method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::validate method instead.', E_USER_DEPRECATED); + + return $this->validate($value, $constraints, $groups); + } + + /** + * {@inheritdoc} + */ + public function getMetadataFactory() + { + @trigger_error('The '.__METHOD__.' method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); + + return $this->metadataFactory; + } + + private static function testConstraints($constraints) + { + return null === $constraints || $constraints instanceof Constraint || (\is_array($constraints) && (0 === \count($constraints) || current($constraints) instanceof Constraint)); + } + + private static function testGroups($groups) + { + return null === $groups || \is_string($groups) || $groups instanceof GroupSequence || (\is_array($groups) && (0 === \count($groups) || \is_string(current($groups)) || current($groups) instanceof GroupSequence)); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/ValidatorInterface.php b/public/system/storage/vendor/symfony/validator/Validator/ValidatorInterface.php new file mode 100644 index 0000000..7815746 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/ValidatorInterface.php @@ -0,0 +1,92 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\ConstraintViolationListInterface; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; + +/** + * Validates PHP values against constraints. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ValidatorInterface extends MetadataFactoryInterface +{ + /** + * Validates a value against a constraint or a list of constraints. + * + * If no constraint is passed, the constraint + * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. + * + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed + * + * @return ConstraintViolationListInterface A list of constraint violations + * If the list is empty, validation + * succeeded + */ + public function validate($value, $constraints = null, $groups = null); + + /** + * Validates a property of an object against the constraints specified + * for this property. + * + * @param object $object The object + * @param string $propertyName The name of the validated property + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed + * + * @return ConstraintViolationListInterface A list of constraint violations + * If the list is empty, validation + * succeeded + */ + public function validateProperty($object, $propertyName, $groups = null); + + /** + * Validates a value against the constraints specified for an object's + * property. + * + * @param object|string $objectOrClass The object or its class name + * @param string $propertyName The name of the property + * @param mixed $value The value to validate against the property's constraints + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed + * + * @return ConstraintViolationListInterface A list of constraint violations + * If the list is empty, validation + * succeeded + */ + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null); + + /** + * Starts a new validation context and returns a validator for that context. + * + * The returned validator collects all violations generated within its + * context. You can access these violations with the + * {@link ContextualValidatorInterface::getViolations()} method. + * + * @return ContextualValidatorInterface The validator for the new context + */ + public function startContext(); + + /** + * Returns a validator in the given execution context. + * + * The returned validator adds all generated violations to the given + * context. + * + * @return ContextualValidatorInterface The validator for that context + */ + public function inContext(ExecutionContextInterface $context); +} diff --git a/public/system/storage/vendor/symfony/validator/ValidatorBuilder.php b/public/system/storage/vendor/symfony/validator/ValidatorBuilder.php new file mode 100644 index 0000000..c99de8c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidatorBuilder.php @@ -0,0 +1,372 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\Common\Annotations\CachedReader; +use Doctrine\Common\Annotations\Reader; +use Doctrine\Common\Cache\ArrayCache; +use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\Translation\IdentityTranslator; +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Context\ExecutionContextFactory; +use Symfony\Component\Validator\Exception\InvalidArgumentException; +use Symfony\Component\Validator\Exception\ValidatorException; +use Symfony\Component\Validator\Mapping\Cache\CacheInterface; +use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; +use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Validator\Mapping\Loader\LoaderChain; +use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; +use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Validator\Mapping\Loader\XmlFilesLoader; +use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; +use Symfony\Component\Validator\Mapping\Loader\YamlFilesLoader; +use Symfony\Component\Validator\Validator\RecursiveValidator; + +/** + * The default implementation of {@link ValidatorBuilderInterface}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +class ValidatorBuilder implements ValidatorBuilderInterface +{ + private $initializers = array(); + private $xmlMappings = array(); + private $yamlMappings = array(); + private $methodMappings = array(); + + /** + * @var Reader|null + */ + private $annotationReader; + + /** + * @var MetadataFactoryInterface|null + */ + private $metadataFactory; + + /** + * @var ConstraintValidatorFactoryInterface|null + */ + private $validatorFactory; + + /** + * @var CacheInterface|null + */ + private $metadataCache; + + /** + * @var TranslatorInterface|null + */ + private $translator; + + /** + * @var string|null + */ + private $translationDomain; + + /** + * @var PropertyAccessorInterface|null + */ + private $propertyAccessor; + + /** + * {@inheritdoc} + */ + public function addObjectInitializer(ObjectInitializerInterface $initializer) + { + $this->initializers[] = $initializer; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addObjectInitializers(array $initializers) + { + $this->initializers = array_merge($this->initializers, $initializers); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addXmlMapping($path) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->xmlMappings[] = $path; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addXmlMappings(array $paths) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->xmlMappings = array_merge($this->xmlMappings, $paths); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addYamlMapping($path) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->yamlMappings[] = $path; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addYamlMappings(array $paths) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->yamlMappings = array_merge($this->yamlMappings, $paths); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addMethodMapping($methodName) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->methodMappings[] = $methodName; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addMethodMappings(array $methodNames) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->methodMappings = array_merge($this->methodMappings, $methodNames); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function enableAnnotationMapping(Reader $annotationReader = null) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot enable annotation mapping after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + if (null === $annotationReader) { + if (!class_exists('Doctrine\Common\Annotations\AnnotationReader') || !class_exists('Doctrine\Common\Cache\ArrayCache')) { + throw new \RuntimeException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and doctrine/cache to be installed.'); + } + + $annotationReader = new CachedReader(new AnnotationReader(), new ArrayCache()); + } + + $this->annotationReader = $annotationReader; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function disableAnnotationMapping() + { + $this->annotationReader = null; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setMetadataFactory(MetadataFactoryInterface $metadataFactory) + { + if (\count($this->xmlMappings) > 0 || \count($this->yamlMappings) > 0 || \count($this->methodMappings) > 0 || null !== $this->annotationReader) { + throw new ValidatorException('You cannot set a custom metadata factory after adding custom mappings. You should do either of both.'); + } + + $this->metadataFactory = $metadataFactory; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setMetadataCache(CacheInterface $cache) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot set a custom metadata cache after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->metadataCache = $cache; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory) + { + if (null !== $this->propertyAccessor) { + throw new ValidatorException('You cannot set a validator factory after setting a custom property accessor. Remove the call to setPropertyAccessor() if you want to call setConstraintValidatorFactory().'); + } + + $this->validatorFactory = $validatorFactory; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setTranslator(TranslatorInterface $translator) + { + $this->translator = $translator; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setTranslationDomain($translationDomain) + { + $this->translationDomain = $translationDomain; + + return $this; + } + + /** + * {@inheritdoc} + * + * @deprecated since version 2.5, to be removed in 3.0. + * The validator will function without a property accessor. + */ + public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor) + { + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. The validator will function without a property accessor.', E_USER_DEPRECATED); + + if (null !== $this->validatorFactory) { + throw new ValidatorException('You cannot set a property accessor after setting a custom validator factory. Configure your validator factory instead.'); + } + + $this->propertyAccessor = $propertyAccessor; + + return $this; + } + + /** + * {@inheritdoc} + * + * @deprecated since version 2.7, to be removed in 3.0. + */ + public function setApiVersion($apiVersion) + { + @trigger_error('The '.__METHOD__.' method is deprecated in version 2.7 and will be removed in version 3.0.', E_USER_DEPRECATED); + + if (!\in_array($apiVersion, array(Validation::API_VERSION_2_4, Validation::API_VERSION_2_5, Validation::API_VERSION_2_5_BC))) { + throw new InvalidArgumentException(sprintf('The requested API version is invalid: "%s"', $apiVersion)); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getValidator() + { + $metadataFactory = $this->metadataFactory; + + if (!$metadataFactory) { + $loaders = array(); + + if (\count($this->xmlMappings) > 1) { + $loaders[] = new XmlFilesLoader($this->xmlMappings); + } elseif (1 === \count($this->xmlMappings)) { + $loaders[] = new XmlFileLoader($this->xmlMappings[0]); + } + + if (\count($this->yamlMappings) > 1) { + $loaders[] = new YamlFilesLoader($this->yamlMappings); + } elseif (1 === \count($this->yamlMappings)) { + $loaders[] = new YamlFileLoader($this->yamlMappings[0]); + } + + foreach ($this->methodMappings as $methodName) { + $loaders[] = new StaticMethodLoader($methodName); + } + + if ($this->annotationReader) { + $loaders[] = new AnnotationLoader($this->annotationReader); + } + + $loader = null; + + if (\count($loaders) > 1) { + $loader = new LoaderChain($loaders); + } elseif (1 === \count($loaders)) { + $loader = $loaders[0]; + } + + $metadataFactory = new LazyLoadingMetadataFactory($loader, $this->metadataCache); + } + + $validatorFactory = $this->validatorFactory ?: new ConstraintValidatorFactory($this->propertyAccessor); + $translator = $this->translator; + + if (null === $translator) { + $translator = new IdentityTranslator(); + // Force the locale to be 'en' when no translator is provided rather than relying on the Intl default locale + // This avoids depending on Intl or the stub implementation being available. It also ensures that Symfony + // validation messages are pluralized properly even when the default locale gets changed because they are in + // English. + $translator->setLocale('en'); + } + + $contextFactory = new ExecutionContextFactory($translator, $this->translationDomain); + + return new RecursiveValidator($contextFactory, $metadataFactory, $validatorFactory, $this->initializers); + } +} diff --git a/public/system/storage/vendor/symfony/validator/ValidatorBuilderInterface.php b/public/system/storage/vendor/symfony/validator/ValidatorBuilderInterface.php new file mode 100644 index 0000000..1b0bd72 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidatorBuilderInterface.php @@ -0,0 +1,181 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Doctrine\Common\Annotations\Reader; +use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Mapping\Cache\CacheInterface; + +/** + * A configurable builder for ValidatorInterface objects. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ValidatorBuilderInterface +{ + /** + * Adds an object initializer to the validator. + * + * @return $this + */ + public function addObjectInitializer(ObjectInitializerInterface $initializer); + + /** + * Adds a list of object initializers to the validator. + * + * @param ObjectInitializerInterface[] $initializers + * + * @return $this + */ + public function addObjectInitializers(array $initializers); + + /** + * Adds an XML constraint mapping file to the validator. + * + * @param string $path The path to the mapping file + * + * @return $this + */ + public function addXmlMapping($path); + + /** + * Adds a list of XML constraint mapping files to the validator. + * + * @param string[] $paths The paths to the mapping files + * + * @return $this + */ + public function addXmlMappings(array $paths); + + /** + * Adds a YAML constraint mapping file to the validator. + * + * @param string $path The path to the mapping file + * + * @return $this + */ + public function addYamlMapping($path); + + /** + * Adds a list of YAML constraint mappings file to the validator. + * + * @param string[] $paths The paths to the mapping files + * + * @return $this + */ + public function addYamlMappings(array $paths); + + /** + * Enables constraint mapping using the given static method. + * + * @param string $methodName The name of the method + * + * @return $this + */ + public function addMethodMapping($methodName); + + /** + * Enables constraint mapping using the given static methods. + * + * @param string[] $methodNames The names of the methods + * + * @return $this + */ + public function addMethodMappings(array $methodNames); + + /** + * Enables annotation based constraint mapping. + * + * @return $this + */ + public function enableAnnotationMapping(Reader $annotationReader = null); + + /** + * Disables annotation based constraint mapping. + * + * @return $this + */ + public function disableAnnotationMapping(); + + /** + * Sets the class metadata factory used by the validator. + * + * @return $this + */ + public function setMetadataFactory(MetadataFactoryInterface $metadataFactory); + + /** + * Sets the cache for caching class metadata. + * + * @return $this + */ + public function setMetadataCache(CacheInterface $cache); + + /** + * Sets the constraint validator factory used by the validator. + * + * @return $this + */ + public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory); + + /** + * Sets the translator used for translating violation messages. + * + * @return $this + */ + public function setTranslator(TranslatorInterface $translator); + + /** + * Sets the default translation domain of violation messages. + * + * The same message can have different translations in different domains. + * Pass the domain that is used for violation messages by default to this + * method. + * + * @param string $translationDomain The translation domain of the violation messages + * + * @return $this + */ + public function setTranslationDomain($translationDomain); + + /** + * Sets the property accessor for resolving property paths. + * + * @param PropertyAccessorInterface $propertyAccessor The property accessor + * + * @return $this + * + * @deprecated since version 2.5, to be removed in 3.0. + */ + public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor); + + /** + * Sets the API version that the returned validator should support. + * + * @param int $apiVersion The required API version + * + * @return $this + * + * @see Validation::API_VERSION_2_5 + * @see Validation::API_VERSION_2_5_BC + * @deprecated since version 2.7, to be removed in 3.0. + */ + public function setApiVersion($apiVersion); + + /** + * Builds and returns a new validator object. + * + * @return ValidatorInterface The built validator + */ + public function getValidator(); +} diff --git a/public/system/storage/vendor/symfony/validator/ValidatorInterface.php b/public/system/storage/vendor/symfony/validator/ValidatorInterface.php new file mode 100644 index 0000000..570ba99 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidatorInterface.php @@ -0,0 +1,103 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Validates values and graphs of objects and arrays. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link \Symfony\Component\Validator\Validator\ValidatorInterface} instead. + */ +interface ValidatorInterface +{ + /** + * Validates a value. + * + * The accepted values depend on the {@link MetadataFactoryInterface} + * implementation. + * + * The signature changed with Symfony 2.5 (see + * {@link Validator\ValidatorInterface::validate()}. This signature will be + * disabled in Symfony 3.0. + * + * @param mixed $value The value to validate + * @param array|null $groups The validation groups to validate + * @param bool $traverse Whether to traverse the value if it is traversable + * @param bool $deep Whether to traverse nested traversable values recursively + * + * @return ConstraintViolationListInterface A list of constraint violations. If the + * list is empty, validation succeeded. + */ + public function validate($value, $groups = null, $traverse = false, $deep = false); + + /** + * Validates a property of a value against its current value. + * + * The accepted values depend on the {@link MetadataFactoryInterface} + * implementation. + * + * @param mixed $containingValue The value containing the property + * @param string $property The name of the property to validate + * @param array|null $groups The validation groups to validate + * + * @return ConstraintViolationListInterface A list of constraint violations. If the + * list is empty, validation succeeded. + */ + public function validateProperty($containingValue, $property, $groups = null); + + /** + * Validate a property of a value against a potential value. + * + * The accepted values depend on the {@link MetadataFactoryInterface} + * implementation. + * + * @param mixed $containingValue The value containing the property + * @param string $property The name of the property to validate + * @param string $value The value to validate against the + * constraints of the property + * @param array|null $groups The validation groups to validate + * + * @return ConstraintViolationListInterface A list of constraint violations. If the + * list is empty, validation succeeded. + */ + public function validatePropertyValue($containingValue, $property, $value, $groups = null); + + /** + * Validates a value against a constraint or a list of constraints. + * + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param array|null $groups The validation groups to validate + * + * @return ConstraintViolationListInterface A list of constraint violations. If the + * list is empty, validation succeeded. + * + * @deprecated since version 2.5, to be removed in 3.0. + * Renamed to {@link Validator\ValidatorInterface::validate()} + * in Symfony 2.5. + */ + public function validateValue($value, $constraints, $groups = null); + + /** + * Returns the factory for metadata instances. + * + * @return MetadataFactoryInterface The metadata factory + * + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link Validator\ValidatorInterface::getMetadataFor()} or + * {@link Validator\ValidatorInterface::hasMetadataFor()} + * instead. + */ + public function getMetadataFactory(); +} diff --git a/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php b/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php new file mode 100644 index 0000000..284841e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php @@ -0,0 +1,181 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Violation; + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; +use Symfony\Component\Validator\Util\PropertyPath; + +/** + * Default implementation of {@link ConstraintViolationBuilderInterface}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @internal You should not instantiate or use this class. Code against + * {@link ConstraintViolationBuilderInterface} instead. + */ +class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface +{ + private $violations; + private $message; + private $parameters; + private $root; + private $invalidValue; + private $propertyPath; + private $translator; + private $translationDomain; + private $plural; + private $constraint; + private $code; + + /** + * @var mixed + */ + private $cause; + + public function __construct(ConstraintViolationList $violations, Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, TranslatorInterface $translator, $translationDomain = null) + { + $this->violations = $violations; + $this->message = $message; + $this->parameters = $parameters; + $this->root = $root; + $this->propertyPath = $propertyPath; + $this->invalidValue = $invalidValue; + $this->translator = $translator; + $this->translationDomain = $translationDomain; + $this->constraint = $constraint; + } + + /** + * {@inheritdoc} + */ + public function atPath($path) + { + $this->propertyPath = PropertyPath::append($this->propertyPath, $path); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setParameter($key, $value) + { + $this->parameters[$key] = $value; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setParameters(array $parameters) + { + $this->parameters = $parameters; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setTranslationDomain($translationDomain) + { + $this->translationDomain = $translationDomain; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setInvalidValue($invalidValue) + { + $this->invalidValue = $invalidValue; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setPlural($number) + { + $this->plural = $number; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCause($cause) + { + $this->cause = $cause; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addViolation() + { + if (null === $this->plural) { + $translatedMessage = $this->translator->trans( + $this->message, + $this->parameters, + $this->translationDomain + ); + } else { + try { + $translatedMessage = $this->translator->transChoice( + $this->message, + $this->plural, + $this->parameters, + $this->translationDomain + ); + } catch (\InvalidArgumentException $e) { + $translatedMessage = $this->translator->trans( + $this->message, + $this->parameters, + $this->translationDomain + ); + } + } + + $this->violations->add(new ConstraintViolation( + $translatedMessage, + $this->message, + $this->parameters, + $this->root, + $this->propertyPath, + $this->invalidValue, + $this->plural, + $this->code, + $this->constraint, + $this->cause + )); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php b/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php new file mode 100644 index 0000000..811b484 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php @@ -0,0 +1,114 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Violation; + +/** + * Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} + * objects. + * + * Use the various methods on this interface to configure the built violation. + * Finally, call {@link addViolation()} to add the violation to the current + * execution context. + * + * @author Bernhard Schussek <bschussek@gmail.com> + */ +interface ConstraintViolationBuilderInterface +{ + /** + * Stores the property path at which the violation should be generated. + * + * The passed path will be appended to the current property path of the + * execution context. + * + * @param string $path The property path + * + * @return $this + */ + public function atPath($path); + + /** + * Sets a parameter to be inserted into the violation message. + * + * @param string $key The name of the parameter + * @param string $value The value to be inserted in the parameter's place + * + * @return $this + */ + public function setParameter($key, $value); + + /** + * Sets all parameters to be inserted into the violation message. + * + * @param array $parameters An array with the parameter names as keys and + * the values to be inserted in their place as + * values + * + * @return $this + */ + public function setParameters(array $parameters); + + /** + * Sets the translation domain which should be used for translating the + * violation message. + * + * @param string $translationDomain The translation domain + * + * @return $this + * + * @see \Symfony\Component\Translation\TranslatorInterface + */ + public function setTranslationDomain($translationDomain); + + /** + * Sets the invalid value that caused this violation. + * + * @param mixed $invalidValue The invalid value + * + * @return $this + */ + public function setInvalidValue($invalidValue); + + /** + * Sets the number which determines how the plural form of the violation + * message is chosen when it is translated. + * + * @param int $number The number for determining the plural form + * + * @return $this + * + * @see \Symfony\Component\Translation\TranslatorInterface::transChoice() + */ + public function setPlural($number); + + /** + * Sets the violation code. + * + * @param string|null $code The violation code + * + * @return $this + */ + public function setCode($code); + + /** + * Sets the cause of the violation. + * + * @param mixed $cause The cause of the violation + * + * @return $this + */ + public function setCause($cause); + + /** + * Adds the violation to the current execution context. + */ + public function addViolation(); +} diff --git a/public/system/storage/vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php b/public/system/storage/vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php new file mode 100644 index 0000000..324e9d1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php @@ -0,0 +1,166 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Violation; + +@trigger_error('The '.__NAMESPACE__.'\LegacyConstraintViolationBuilder class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + +use Symfony\Component\Validator\ExecutionContextInterface; + +/** + * Backwards-compatible implementation of {@link ConstraintViolationBuilderInterface}. + * + * @author Bernhard Schussek <bschussek@gmail.com> + * + * @internal You should not instantiate or use this class. Code against + * {@link ConstraintViolationBuilderInterface} instead. + * + * @deprecated since version 2.5.5, to be removed in 3.0. + */ +class LegacyConstraintViolationBuilder implements ConstraintViolationBuilderInterface +{ + /** + * @var ExecutionContextInterface + */ + private $context; + + /** + * @var string + */ + private $message; + + /** + * @var array + */ + private $parameters; + + /** + * @var mixed + */ + private $invalidValue; + + /** + * @var string + */ + private $propertyPath; + + /** + * @var int|null + */ + private $plural; + + /** + * @var mixed + */ + private $code; + + public function __construct(ExecutionContextInterface $context, $message, array $parameters) + { + $this->context = $context; + $this->message = $message; + $this->parameters = $parameters; + $this->invalidValue = $context->getValue(); + } + + /** + * {@inheritdoc} + */ + public function atPath($path) + { + $this->propertyPath = $path; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setParameter($key, $value) + { + $this->parameters[$key] = $value; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setParameters(array $parameters) + { + $this->parameters = $parameters; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setTranslationDomain($translationDomain) + { + // can't be set in the old API + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setInvalidValue($invalidValue) + { + $this->invalidValue = $invalidValue; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setPlural($number) + { + $this->plural = $number; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCause($cause) + { + // do nothing - we can't save the cause through the old API + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addViolation() + { + if ($this->propertyPath) { + $this->context->addViolationAt($this->propertyPath, $this->message, $this->parameters, $this->invalidValue, $this->plural, $this->code); + + return; + } + + $this->context->addViolation($this->message, $this->parameters, $this->invalidValue, $this->plural, $this->code); + } +} diff --git a/public/system/storage/vendor/symfony/validator/composer.json b/public/system/storage/vendor/symfony/validator/composer.json new file mode 100644 index 0000000..99ccc33 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/composer.json @@ -0,0 +1,58 @@ +{ + "name": "symfony/validator", + "type": "library", + "description": "Symfony Validator Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.9", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation": "~2.4|~3.0.0" + }, + "require-dev": { + "symfony/http-foundation": "~2.3|~3.0.0", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", + "symfony/yaml": "^2.0.5|~3.0.0", + "symfony/config": "~2.2|~3.0.0", + "symfony/property-access": "~2.3|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "egulias/email-validator": "^1.2.1" + }, + "suggest": { + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "symfony/http-foundation": "", + "symfony/intl": "", + "symfony/yaml": "", + "symfony/config": "", + "egulias/email-validator": "Strict (RFC compliant) email validation", + "symfony/property-access": "For using the 2.4 Validator API", + "symfony/expression-language": "For using the 2.4 Expression validator" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Validator\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/phpunit.xml.dist b/public/system/storage/vendor/symfony/validator/phpunit.xml.dist new file mode 100644 index 0000000..5d07c4e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/phpunit.xml.dist @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd" + backupGlobals="false" + colors="true" + bootstrap="vendor/autoload.php" + failOnRisky="true" + failOnWarning="true" +> + <php> + <ini name="error_reporting" value="-1" /> + </php> + + <testsuites> + <testsuite name="Symfony Validator Component Test Suite"> + <directory>./Tests/</directory> + </testsuite> + </testsuites> + + <filter> + <whitelist> + <directory>./</directory> + <exclude> + <directory>./Resources</directory> + <directory>./Tests</directory> + <directory>./vendor</directory> + </exclude> + </whitelist> + </filter> +</phpunit> |