From a9e1cb7c68e18d963239a4cf27096bff09d66204 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 4 Dec 2012 15:28:25 -0500 Subject: [PATCH] Added missing framework files. --- .../Http/PhpEnvironment/RemoteAddress.php | 170 +++++++++++ .../Plugin/AcceptableViewModelSelector.php | 288 ++++++++++++++++++ vendor/ZF2/resources/composer.json | 15 + .../resources/languages/zh/Zend_Captcha.php | 35 +++ .../resources/languages/zh/Zend_Validate.php | 279 +++++++++++++++++ 5 files changed, 787 insertions(+) create mode 100644 vendor/ZF2/library/Zend/Http/PhpEnvironment/RemoteAddress.php create mode 100644 vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AcceptableViewModelSelector.php create mode 100644 vendor/ZF2/resources/composer.json create mode 100644 vendor/ZF2/resources/languages/zh/Zend_Captcha.php create mode 100644 vendor/ZF2/resources/languages/zh/Zend_Validate.php diff --git a/vendor/ZF2/library/Zend/Http/PhpEnvironment/RemoteAddress.php b/vendor/ZF2/library/Zend/Http/PhpEnvironment/RemoteAddress.php new file mode 100644 index 00000000000..47b52fb83b6 --- /dev/null +++ b/vendor/ZF2/library/Zend/Http/PhpEnvironment/RemoteAddress.php @@ -0,0 +1,170 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @package Zend_Http + */ + +namespace Zend\Http\PhpEnvironment; + +/** + * Functionality for determining client IP address. + * + * @category Zend + * @package Zend_Http + */ +class RemoteAddress +{ + /** + * Whether to use proxy addresses or not. + * + * As default this setting is disabled - IP address is mostly needed to increase + * security. HTTP_* are not reliable since can easily be spoofed. It can be enabled + * just for more flexibility, but if user uses proxy to connect to trusted services + * it's his/her own risk, only reliable field for IP address is $_SERVER['REMOTE_ADDR']. + * + * @var bool + */ + protected $useProxy = false; + + /** + * List of trusted proxy IP addresses + * + * @var array + */ + protected $trustedProxies = array(); + + /** + * HTTP header to introspect for proxies + * + * @var string + */ + protected $proxyHeader = 'HTTP_X_FORWARDED_FOR'; + + + /** + * Changes proxy handling setting. + * + * This must be static method, since validators are recovered automatically + * at session read, so this is the only way to switch setting. + * + * @param bool $useProxy Whether to check also proxied IP addresses. + * @return RemoteAddress + */ + public function setUseProxy($useProxy = true) + { + $this->useProxy = $useProxy; + return $this; + } + + /** + * Checks proxy handling setting. + * + * @return bool Current setting value. + */ + public function getUseProxy() + { + return $this->useProxy; + } + + /** + * Set list of trusted proxy addresses + * + * @param array $trustedProxies + * @return RemoteAddress + */ + public function setTrustedProxies(array $trustedProxies) + { + $this->trustedProxies = $trustedProxies; + return $this; + } + + /** + * Set the header to introspect for proxy IPs + * + * @param string $header + * @return RemoteAddress + */ + public function setProxyHeader($header = 'X-Forwarded-For') + { + $this->proxyHeader = $this->normalizeProxyHeader($header); + return $this; + } + + /** + * Returns client IP address. + * + * @return string IP address. + */ + public function getIpAddress() + { + $ip = $this->getIpAddressFromProxy(); + if ($ip) { + return $ip; + } + + // direct IP address + if (isset($_SERVER['REMOTE_ADDR'])) { + return $_SERVER['REMOTE_ADDR']; + } + + return ''; + } + + /** + * Attempt to get the IP address for a proxied client + * + * @return false|string + */ + protected function getIpAddressFromProxy() + { + if (!$this->useProxy) { + return false; + } + + $header = $this->proxyHeader; + + if (!isset($_SERVER[$header]) || empty($_SERVER[$header])) { + return false; + } + + // Extract IPs + $ips = explode(',', $_SERVER[$header]); + // trim, so we can compare against trusted proxies properly + $ips = array_map('trim', $ips); + // remove trusted proxy IPs + $ips = array_diff($ips, $this->trustedProxies); + + // Any left? + if (empty($ips)) { + return false; + } + + // Return right-most + $ip = array_pop($ips); + return $ip; + } + + + /** + * Normalize a header string + * + * Normalizes a header string to a format that is compatible with + * $_SERVER + * + * @param string $header + * @return string + */ + protected function normalizeProxyHeader($header) + { + $header = strtoupper($header); + $header = str_replace('-', '_', $header); + if (0 !== strpos($header, 'HTTP_')) { + $header = 'HTTP_' . $header; + } + return $header; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AcceptableViewModelSelector.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AcceptableViewModelSelector.php new file mode 100644 index 00000000000..c002ab4280c --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AcceptableViewModelSelector.php @@ -0,0 +1,288 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @package Zend_Mvc + */ + +namespace Zend\Mvc\Controller\Plugin; + +use Zend\Http\Request; +use Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart; +use Zend\Mvc\Controller\Plugin\AbstractPlugin; +use Zend\View\Model\ModelInterface; +use Zend\Mvc\InjectApplicationEventInterface; +use Zend\Mvc\MvcEvent; +use Zend\Mvc\Exception\InvalidArgumentException; +use Zend\Mvc\Exception\DomainException; + + +/** + * Controller Plugin to assist in selecting an appropriate View Model type based on the + * User Agent's accept header. + * + * @category Zend + * @package Zend_Mvc + * @subpackage Controller + */ +class AcceptableViewModelSelector extends AbstractPlugin +{ + /** + * + * @var string the Key to inject the name of a viewmodel with in an Accept Header + */ + const INJECT_VIEWMODEL_NAME = '_internalViewModel'; + + /** + * + * @var \Zend\Mvc\MvcEvent + */ + protected $event; + + /** + * + * @var \Zend\Http\Request + */ + protected $request; + + /** + * Default array to match against. + * + * @var Array + */ + protected $defaultMatchAgainst; + + /** + * + * @var string Default ViewModel + */ + protected $defaultViewModelName = 'Zend\View\Model\ViewModel'; + + /** + * Detects an appropriate viewmodel for request. + * + * @param array $matchAgainst (optional) The Array to match against + * @param bool $returnDefault (optional) If no match is available. Return default instead + * @param AbstractFieldValuePart|null $resultReference (optional) The object that was matched + * @throws InvalidArgumentException If the supplied and matched View Model could not be found + * @return ModelInterface|null + */ + public function __invoke( + array $matchAgainst = null, + $returnDefault = true, + & $resultReference = null + ) { + return $this->getViewModel($matchAgainst, $returnDefault, $resultReference); + } + + /** + * Detects an appropriate viewmodel for request. + * + * @param array $matchAgainst (optional) The Array to match against + * @param bool $returnDefault (optional) If no match is available. Return default instead + * @param AbstractFieldValuePart|null $resultReference (optional) The object that was matched + * @throws InvalidArgumentException If the supplied and matched View Model could not be found + * @return ModelInterface|null + */ + public function getViewModel( + array $matchAgainst = null, + $returnDefault = true, + & $resultReference = null + ) { + $name = $this->getViewModelName($matchAgainst, $returnDefault, $resultReference); + + if (!$name) { + return; + } + + if (!class_exists($name)) { + throw new InvalidArgumentException('The supplied View Model could not be found'); + } + + return new $name(); + } + + /** + * Detects an appropriate viewmodel name for request. + * + * @param array $matchAgainst (optional) The Array to match against + * @param bool $returnDefault (optional) If no match is available. Return default instead + * @param AbstractFieldValuePart|null $resultReference (optional) The object that was matched. + * @return ModelInterface|null Returns null if $returnDefault = false and no match could be made + */ + public function getViewModelName( + array $matchAgainst = null, + $returnDefault = true, + & $resultReference = null + ) { + $res = $this->match($matchAgainst); + if ($res) { + $resultReference = $res; + return $this->extractViewModelName($res); + } + + if ($returnDefault) { + return $this->defaultViewModelName; + } + } + + /** + * Detects an appropriate viewmodel name for request. + * + * @param array $matchAgainst (optional) The Array to match against + * @return AbstractFieldValuePart|null The object that was matched + */ + public function match(array $matchAgainst = null) + { + $request = $this->getRequest(); + $headers = $request->getHeaders(); + + if ((!$matchAgainst && !$this->defaultMatchAgainst) || !$headers->has('accept')) { + return null; + } + + if (!$matchAgainst) { + $matchAgainst = $this->defaultMatchAgainst; + } + + $matchAgainstString = ''; + foreach ($matchAgainst as $modelName => $modelStrings) { + foreach ((array) $modelStrings as $modelString) { + $matchAgainstString .= $this->injectViewModelName($modelString, $modelName); + } + } + + /** @var $accept \Zend\Http\Header\Accept */ + $accept = $headers->get('Accept'); + if (($res = $accept->match($matchAgainstString)) === false) { + return null; + } + + return $res; + } + + /** + * Set the default View Model (name) to return if no match could be made + * @param string $defaultViewModelName The default View Model name + * @return AcceptableViewModelSelector provides fluent interface + */ + public function setDefaultViewModelName($defaultViewModelName) + { + $this->defaultViewModelName = (string) $defaultViewModelName; + return $this; + } + + /** + * Set the default View Model (name) to return if no match could be made + * @return string + */ + public function getDefaultViewModelName() + { + return $this->defaultViewModelName; + } + + /** + * Set the default Accept Types and View Model combinations to match against if none are specified. + * + * @param array $matchAgainst (optional) The Array to match against + * @return AcceptableViewModelSelector provides fluent interface + */ + public function setDefaultMatchAgainst(array $matchAgainst = null) + { + $this->defaultMatchAgainst = $matchAgainst; + return $this; + } + + /** + * Get the default Accept Types and View Model combinations to match against if none are specified. + * + * @return array|null + */ + public function getDefaultMatchAgainst() + { + return $this->defaultMatchAgainst; + } + + /** + * Inject the viewmodel name into the accept header string + * + * @param string $modelAcceptString + * @param string $modelName + * @return string + */ + protected function injectViewModelName($modelAcceptString, $modelName) + { + $modelName = str_replace('\\', '|', $modelName); + return $modelAcceptString . '; ' . self::INJECT_VIEWMODEL_NAME . '="' . $modelName . '", '; + } + + /** + * Extract the viewmodel name from a match + * @param AbstractFieldValuePart $res + * @return string + */ + protected function extractViewModelName(AbstractFieldValuePart $res) + { + $modelName = $res->getMatchedAgainst()->params[self::INJECT_VIEWMODEL_NAME]; + return str_replace('|', '\\', $modelName); + } + + /** + * Get the request + * + * @return Request + * @throws DomainException if unable to find request + */ + protected function getRequest() + { + if ($this->request) { + return $this->request; + } + + $event = $this->getEvent(); + $request = $event->getRequest(); + if (!$request instanceof Request) { + throw new DomainException( + 'The event used does not contain a valid Request, but must.' + ); + } + + $this->request = $request; + return $request; + } + + /** + * Get the event + * + * @return MvcEvent + * @throws DomainException if unable to find event + */ + protected function getEvent() + { + if ($this->event) { + return $this->event; + } + + $controller = $this->getController(); + if (!$controller instanceof InjectApplicationEventInterface) { + throw new DomainException( + 'A controller that implements InjectApplicationEventInterface ' + . 'is required to use ' . __CLASS__ + ); + } + + $event = $controller->getEvent(); + if (!$event instanceof MvcEvent) { + $params = $event->getParams(); + $event = new MvcEvent(); + $event->setParams($params); + } + $this->event = $event; + + return $this->event; + } + +} diff --git a/vendor/ZF2/resources/composer.json b/vendor/ZF2/resources/composer.json new file mode 100644 index 00000000000..e8a4b6f0078 --- /dev/null +++ b/vendor/ZF2/resources/composer.json @@ -0,0 +1,15 @@ +{ + "name": "zendframework/zend-resources", + "description": "provides validator translations", + "license": "BSD-3-Clause", + "keywords": [ + "zf2", + "resources", + "translations" + ], + "target-dir": "Zend/resources", + "require": { + "php": ">=5.3.3" + } +} + diff --git a/vendor/ZF2/resources/languages/zh/Zend_Captcha.php b/vendor/ZF2/resources/languages/zh/Zend_Captcha.php new file mode 100644 index 00000000000..591a2ea25b4 --- /dev/null +++ b/vendor/ZF2/resources/languages/zh/Zend_Captcha.php @@ -0,0 +1,35 @@ +<?php +/** + * Zend Framework + * + * LICENSE + * + * This source file is subject to the new BSD license that is bundled + * with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://framework.zend.com/license/new-bsd + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@zend.com so we can send you a copy immediately. + * + * @category Zend + * @package Zend_Translate + * @subpackage Resource + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +/** + * ZH-Revision: 09.Nov.2012 + */ +return array( + // Zend_Captcha_ReCaptcha + "Missing captcha fields" => "没有找到验è¯ç 区域", + "Failed to validate captcha" => "验è¯ç æ ¡éªŒå¤±è´¥", + "Captcha value is wrong: %value%" => "验è¯ç ä¸åŒ¹é…: %value%", + + // Zend_Captcha_Word + "Empty captcha value" => "请输入验è¯ç ", + "Captcha ID field is missing" => "没有找到验è¯ç 区域", + "Captcha value is wrong" => "验è¯ç ä¸åŒ¹é…", +); diff --git a/vendor/ZF2/resources/languages/zh/Zend_Validate.php b/vendor/ZF2/resources/languages/zh/Zend_Validate.php new file mode 100644 index 00000000000..2c23cc74d6f --- /dev/null +++ b/vendor/ZF2/resources/languages/zh/Zend_Validate.php @@ -0,0 +1,279 @@ +<?php +/** + * Zend Framework + * + * LICENSE + * + * This source file is subject to the new BSD license that is bundled + * with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://framework.zend.com/license/new-bsd + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@zend.com so we can send you a copy immediately. + * + * @category Zend + * @package Zend_Translator + * @subpackage Resource + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +/** + * ZH-Revision: 09.Nov.2012 + */ +return array( + // Zend_I18n_Validator_Alnum + "Invalid type given. String, integer or float expected" => "请输入一个整数或å°æ•°", + "The input contains characters which are non alphabetic and no digits" => "输入ä¸èƒ½ä¸ºå—æ¯æ•°å—以外的å—符", + "The input is an empty string" => "输入ä¸èƒ½ä¸ºç©º", + + // Zend_I18n_Validator_Alpha + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + "The input contains non alphabetic characters" => "输入ä¸èƒ½ä¸ºå—æ¯ä»¥å¤–çš„å—符", + "The input is an empty string" => "输入ä¸èƒ½ä¸ºç©º", + + // Zend_I18n_Validator_Float + "Invalid type given. String, integer or float expected" => "请输入与一个整数或å°æ•°", + "The input does not appear to be a float" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå°æ•°", + + // Zend_I18n_Validator_Int + "Invalid type given. String or integer expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥å—符或数å—", + "The input does not appear to be an integer" => "请输入一个整数", + + // Zend_I18n_Validator_PostCode + "Invalid type given. String or integer expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符或数å—", + "The input does not appear to be a postal code" => "æ— æ•ˆçš„é‚®æ”¿ç¼–ç æ ¼å¼", + "An exception has been raised while validating the input" => "验è¯è¾“入时有异常å‘生", + + // Zend_Validator_Barcode + "The input failed checksum validation" => "输入的æ¡ç æ— æ³•é€šè¿‡æ ¡éªŒ", + "The input contains invalid characters" => "输入的æ¡ç 包å«æ— 效的å—符", + "The input should have a length of %length% characters" => "输入的æ¡ç 长度应为%length%个å—符", + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + + // Zend_Validator_Between + "The input is not between '%min%' and '%max%', inclusively" => "请输入大于ç‰äºŽ'%min%'并å°äºŽç‰äºŽ'%max%'的值", + "The input is not strictly between '%min%' and '%max%'" => "请输入大于'%min%'并å°äºŽ'%max%'的值", + + // Zend_Validator_Callback + "The input is not valid" => "è¾“å…¥æ— æ•ˆ", + "An exception has been raised within the callback" => "回调ä¸æœ‰å¼‚常å‘生", + + // Zend_Validator_CreditCard + "The input seems to contain an invalid checksum" => "输入的å¡å·æ ¼å¼æœ‰è¯¯", + "The input must contain only digits" => "å¡å·åº”为数å—", + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + "The input contains an invalid amount of digits" => "输入的å¡å·é•¿åº¦æœ‰è¯¯", + "The input is not from an allowed institute" => "输入的å¡å·æ²¡æœ‰æ‰¾åˆ°å¯¹åº”çš„å‘行机构", + "The input seems to be an invalid creditcard number" => "输入的å¡å·æ— æ³•é€šè¿‡æ ¡éªŒ", + "An exception has been raised while validating the input" => "验è¯è¾“入时有异常å‘生", + + // Zend_Validator_Csrf + "The form submitted did not originate from the expected site" => "表å•æ交æ¥æºç½‘站未ç»è¿‡è®¸å¯", + + // Zend_Validator_Date + "Invalid type given. String, integer, array or DateTime expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥å—符数å—或日期", + "The input does not appear to be a valid date" => "è¾“å…¥çš„æ—¥æœŸæ ¼å¼æ— 效", + "The input does not fit the date format '%format%'" => "è¯·æŒ‰ç…§æ—¥æœŸæ ¼å¼'%format%'输入一个日期", + + // Zend_Validator_DateStep + "Invalid type given. String, integer, array or DateTime expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥å—符数å—或日期", + "The input does not appear to be a valid date" => "è¾“å…¥çš„æ—¥æœŸæ ¼å¼æ— 效", + "The input is not a valid step" => "The input is not a valid step", + + // Zend_Validator_Db_AbstractDb + "No record matching the input was found" => "没有找到匹é…输入的记录", + "A record matching the input was found" => "输入已ç»è¢«å 用", + + // Zend_Validator_Digits + "The input must contain only digits" => "输入ä¸èƒ½ä¸ºæ•°å—以外的å—符", + "The input is an empty string" => "输入ä¸èƒ½ä¸ºç©º", + "Invalid type given. String, integer or float expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥å—符整数或å°æ•°", + + // Zend_Validator_EmailAddress + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + "The input is not a valid email address. Use the basic format local-part@hostname" => "输入邮件地å€æ ¼å¼æœ‰è¯¯ï¼Œè¯·æ£€æŸ¥æ ¼å¼æ˜¯å¦ä¸ºlocal-part@hostname", + "'%hostname%' is not a valid hostname for the email address" => "'%hostname%'ä¸æ˜¯ä¸€ä¸ªå¯ç”¨çš„邮件域å", + "'%hostname%' does not appear to have any valid MX or A records for the email address" => "'%hostname%'域å下没有找到å¯ç”¨çš„MX或Aè®°å½•ï¼Œé‚®ä»¶æ— æ³•æŠ•é€’", + "'%hostname%' is not in a routable network segment. The email address should not be resolved from public network" => "'%hostname%'域åæ‰€åœ¨ç½‘æ®µæ— æ³•è¢«è·¯ç”±ï¼Œé‚®ä»¶åœ°å€åº”ä½äºŽå…¬å…±ç½‘络", + "'%localPart%' can not be matched against dot-atom format" => "邮件用户å部分'%localPart%'æ ¼å¼æ— 法匹é…dot-atomæ ¼å¼", + "'%localPart%' can not be matched against quoted-string format" => "邮件用户å部分'%localPart%'æ ¼å¼æ— 法匹é…quoted-stringæ ¼å¼", + "'%localPart%' is not a valid local part for the email address" => "'%localPart%'ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„邮件用户å", + "The input exceeds the allowed length" => "输入超出å…许长度", + + // Zend_Validator_Explode + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + + // Zend_Validator_File_Count + "Too many files, maximum '%max%' are allowed but '%count%' are given" => "文件过多,最多å…许'%max%'个文件,找到'%count%'个", + "Too few files, minimum '%min%' are expected but '%count%' are given" => "文件过少,至少需è¦'%min%'个文件,找到'%count%'个", + + // Zend_Validator_File_Crc32 + "File '%value%' does not match the given crc32 hashes" => "文件'%value%'æ— æ³•é€šè¿‡CRC32æ ¡éªŒ", + "A crc32 hash could not be evaluated for the given file" => "æ–‡ä»¶æ— æ³•ç”ŸæˆCRC32æ ¡éªŒç ", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_ExcludeExtension + "File '%value%' has a false extension" => "文件'%value%'扩展åä¸å…许", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_Exists + "File '%value%' does not exist" => "文件'%value%'ä¸å˜åœ¨", + + // Zend_Validator_File_Extension + "File '%value%' has a false extension" => "文件'%value%'扩展åä¸å…许", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_FilesSize + "All files in sum should have a maximum size of '%max%' but '%size%' were detected" => "所有文件总大å°'%size%'超出,最大å…许'%max%'", + "All files in sum should have a minimum size of '%min%' but '%size%' were detected" => "所有文件总大å°'%size%'ä¸è¶³ï¼Œè‡³å°‘需è¦'%min%'", + "One or more files can not be read" => "ä¸€ä¸ªæˆ–å¤šä¸ªæ–‡ä»¶æ— æ³•è¯»å–", + + // Zend_Validator_File_Hash + "File '%value%' does not match the given hashes" => "文件'%value%'æ— æ³•é€šè¿‡å“ˆå¸Œæ ¡éªŒ", + "A hash could not be evaluated for the given file" => "æ–‡ä»¶æ— æ³•ç”Ÿæˆå“ˆå¸Œæ ¡éªŒç ", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_ImageSize + "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected" => "图片'%value%'的宽度'%width%'超出,最大å…许'%maxwidth%'", + "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected" => "图片'%value%'的宽度'%width%'ä¸è¶³ï¼Œè‡³å°‘应为'%minwidth%'", + "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected" => "图片'%value%'的高度'%height%'超出,最大å…许'%maxheight%'", + "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected" => "图片'%value%'的高度'%height%'ä¸è¶³ï¼Œè‡³å°‘应为'%minheight%'", + "The size of image '%value%' could not be detected" => "图片'%value%'çš„å°ºå¯¸æ— æ³•è¯»å–", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_IsCompressed + "File '%value%' is not compressed, '%type%' detected" => "文件'%value%'没有被压缩,检测到文件的媒体类型为'%type%'", + "The mimetype of file '%value%' could not be detected" => "文件'%value%'çš„åª’ä½“ç±»åž‹æ— æ³•æ£€æµ‹", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_IsImage + "File '%value%' is no image, '%type%' detected" => "文件'%value%'ä¸æ˜¯å›¾ç‰‡ï¼Œæ£€æµ‹åˆ°æ–‡ä»¶çš„媒体类型为'%type%'", + "The mimetype of file '%value%' could not be detected" => "文件'%value%'çš„åª’ä½“ç±»åž‹æ— æ³•æ£€æµ‹", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_Md5 + "File '%value%' does not match the given md5 hashes" => "文件'%value%'æ— æ³•é€šè¿‡MD5æ ¡éªŒ", + "A md5 hash could not be evaluated for the given file" => "æ–‡ä»¶æ— æ³•ç”ŸæˆMD5æ ¡éªŒç ", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_MimeType + "File '%value%' has a false mimetype of '%type%'" => "文件'%value%'的媒体类型'%type%'ä¸å…许", + "The mimetype of file '%value%' could not be detected" => "文件'%value%'çš„åª’ä½“ç±»åž‹æ— æ³•æ£€æµ‹", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_NotExists + "File '%value%' exists" => "文件'%value%'å·²ç»å˜åœ¨", + + // Zend_Validator_File_Sha1 + "File '%value%' does not match the given sha1 hashes" => "文件'%value%'æ— æ³•é€šè¿‡SHA1æ ¡éªŒ", + "A sha1 hash could not be evaluated for the given file" => "æ–‡ä»¶æ— æ³•ç”ŸæˆSHA1æ ¡éªŒç ", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_Size + "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected" => "文件'%value%'的大å°'%size%'超出,最大å…许'%max%'", + "Minimum expected size for file '%value%' is '%min%' but '%size%' detected" => "文件'%value%'的大å°'%size%'ä¸è¶³ï¼Œè‡³å°‘需è¦'%min%'", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_File_Upload + "File '%value%' exceeds the defined ini size" => "文件'%value%'大å°è¶…出系统å…许范围", + "File '%value%' exceeds the defined form size" => "文件'%value%'大å°è¶…出表å•å…许范围", + "File '%value%' was only partially uploaded" => "文件'%value%'ä¸Šä¼ ä¸å®Œæ•´", + "File '%value%' was not uploaded" => "文件'%value%'æ²¡æœ‰è¢«ä¸Šä¼ ", + "No temporary directory was found for file '%value%'" => "没有找到临时文件夹å˜æ”¾æ–‡ä»¶'%value%'", + "File '%value%' can't be written" => "文件'%value%'æ— æ³•è¢«å†™å…¥", + "A PHP extension returned an error while uploading the file '%value%'" => "文件'%value%'ä¸Šä¼ æ—¶å‘生了一个PHP扩展错误", + "File '%value%' was illegally uploaded. This could be a possible attack" => "文件'%value%'被éžæ³•ä¸Šä¼ ,这å¯èƒ½è¢«åˆ¤å®šä¸ºä¸€æ¬¡å…¥ä¾µ", + "File '%value%' was not found" => "文件'%value%'ä¸å˜åœ¨", + "Unknown error while uploading file '%value%'" => "文件'%value%'ä¸Šä¼ æ—¶å‘生了一个未知错误", + + // Zend_Validator_File_WordCount + "Too much words, maximum '%max%' are allowed but '%count%' were counted" => "输入的å•è¯è¿‡å¤šï¼Œæœ€å¤šå…许'%max%'个å•è¯ï¼Œè¾“入了'%count%'个", + "Too less words, minimum '%min%' are expected but '%count%' were counted" => "输入的å•è¯è¿‡å°‘,至少需è¦'%min%'个å•è¯ï¼Œè¾“入了'%count%'个", + "File '%value%' is not readable or does not exist" => "文件'%value%'æ— æ³•è¯»å–或ä¸å˜åœ¨", + + // Zend_Validator_GreaterThan + "The input is not greater than '%min%'" => "输入应大于'%min%'", + "The input is not greater or equal than '%min%'" => "输入应大于ç‰äºŽ'%min%'", + + // Zend_Validator_Hex + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + "The input contains non-hexadecimal characters" => "请输入åå…进制å…许的å—符", + + // Zend_Validator_Hostname + "The input appears to be a DNS hostname but the given punycode notation cannot be decoded" => "输入的DNS域å在解æžä¸æ— 法用给定的punycodeæ£ç¡®è§£ç ", + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + "The input appears to be a DNS hostname but contains a dash in an invalid position" => "输入的DNS域åä¸è¿žæŽ¥ç¬¦ä½ç½®ä¸ç¬¦åˆè§„定", + "The input does not match the expected structure for a DNS hostname" => "输入的DNS域å结构组æˆæœ‰è¯¯", + "The input appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'" => "输入的DNS域å的顶级域å'%tld%'æ— æ³•è¢«è§£æž", + "The input does not appear to be a valid local network name" => "输入域åä¸æ˜¯ä¸€ä¸ªæœ¬åœ°åŸŸå", + "The input does not appear to be a valid URI hostname" => "域åæ ¼å¼æœ‰è¯¯", + "The input appears to be an IP address, but IP addresses are not allowed" => "ä¸å…许输入IP地å€ä½œä¸ºåŸŸå", + "The input appears to be a local network name but local network names are not allowed" => "ä¸å…许输入本地或局域网内域å", + "The input appears to be a DNS hostname but cannot extract TLD part" => "在输入的DNS域åä¸æ— 法找到顶级域å部分", + "The input appears to be a DNS hostname but cannot match TLD against known list" => "在输入的DNS域åä¸ï¼Œé¡¶çº§åŸŸåéƒ¨åˆ†æ— æ³•åŒ¹é…已知列表", + + // Zend_Validator_Iban + "Unknown country within the IBAN" => "输入的IBANå¸å·æ— 法找到对应的国家", + "Countries outside the Single Euro Payments Area (SEPA) are not supported" => "ä¸æ”¯æŒå•ä¸€æ¬§å…ƒæ”¯ä»˜åŒº(SEPA)以外的å¸å·", + "The input has a false IBAN format" => "输入的IBANå¸å·æ ¼å¼æœ‰è¯¯", + "The input has failed the IBAN check" => "输入的IBANå¸å·æ ¡éªŒå¤±è´¥", + + // Zend_Validator_Identical + "The two given tokens do not match" => "两个验è¯ä»¤ç‰Œä¸åŒ¹é…", + "No token was provided to match against" => "æ²¡æœ‰ä»¤ç‰Œè¾“å…¥ï¼Œæ— æ³•åŒ¹é…", + + // Zend_Validator_InArray + "The input was not found in the haystack" => "输入没有在指定的å…许范围内", + + // Zend_Validator_Ip + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + "The input does not appear to be a valid IP address" => "输入的IP地å€æ ¼å¼ä¸æ£ç¡®", + + // Zend_Validator_Isbn + "Invalid type given. String or integer expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥å—符或整数", + "The input is not a valid ISBN number" => "输入的ISBNç¼–å·æ ¼å¼ä¸æ£ç¡®", + + // Zend_Validator_LessThan + "The input is not less than '%max%'" => "输入应å°äºŽ'%max%'", + "The input is not less or equal than '%max%'" => "输入应å°äºŽç‰äºŽ'%max%'", + + // Zend_Validator_NotEmpty + "Value is required and can't be empty" => "输入ä¸èƒ½ä¸ºç©º", + "Invalid type given. String, integer, float, boolean or array expected" => "è¾“å…¥æ— æ•ˆï¼Œåªå…许å—符ã€æ•´æ•°ã€å°æ•°ã€å¸ƒå°”值ã€æ•°ç»„类型", + + // Zend_Validator_Regex + "Invalid type given. String, integer or float expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥å—符ã€æ•´æ•°æˆ–å°æ•°", + "The input does not match against pattern '%pattern%'" => "输入ä¸åŒ¹é…指定的模å¼'%pattern%'", + "There was an internal error while using the pattern '%pattern%'" => "匹é…指定模å¼'%pattern%'时有内部错误å‘生", + + // Zend_Validator_Sitemap_Changefreq + "The input is not a valid sitemap changefreq" => "输入ä¸ç¬¦åˆç½‘站地图的changefreqæ ¼å¼", + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + + // Zend_Validator_Sitemap_Lastmod + "The input is not a valid sitemap lastmod" => "输入ä¸ç¬¦åˆç½‘站地图的lastmodæ ¼å¼", + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + + // Zend_Validator_Sitemap_Loc + "The input is not a valid sitemap location" => "输入ä¸ç¬¦åˆç½‘站地图的locationæ ¼å¼", + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + + // Zend_Validator_Sitemap_Priority + "The input is not a valid sitemap priority" => "输入ä¸ç¬¦åˆç½‘站地图的priorityæ ¼å¼", + "Invalid type given. Numeric string, integer or float expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªæ•°å—", + + // Zend_Validator_Step + "Invalid value given. Scalar expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªæ•°å—", + "The input is not a valid step" => "输入ä¸åœ¨é˜¶æ¢¯è®¡ç®—的结果范围内", + + // Zend_Validator_StringLength + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + "The input is less than %min% characters long" => "输入å—符个数应大于%min%", + "The input is more than %max% characters long" => "输入å—符个数应å°äºŽ%max%", + + // Zend_Validator_Uri + "Invalid type given. String expected" => "è¾“å…¥æ— æ•ˆï¼Œè¯·è¾“å…¥ä¸€ä¸ªå—符串", + "The input does not appear to be a valid Uri" => "输入的Uriæ ¼å¼æœ‰è¯¯", +); -- GitLab