mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
translation changes for the Utility dir
This commit is contained in:
parent
26038b13e1
commit
e2dfafddb2
7 changed files with 34 additions and 34 deletions
|
@ -149,7 +149,7 @@ class ClassRegistry {
|
|||
}
|
||||
|
||||
if (!isset(${$class})) {
|
||||
trigger_error(__('(ClassRegistry::init() could not create instance of %1$s class %2$s ', $class, $type), E_USER_WARNING);
|
||||
trigger_error(__d('cake', '(ClassRegistry::init() could not create instance of %1$s class %2$s ', $class, $type), E_USER_WARNING);
|
||||
return $false;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ class ClassRegistry {
|
|||
$_this->map($alias, $class);
|
||||
}
|
||||
} elseif (is_numeric($settings)) {
|
||||
trigger_error(__('(ClassRegistry::init() Attempted to create instance of a class with a numeric name'), E_USER_WARNING);
|
||||
trigger_error(__d('cake', '(ClassRegistry::init() Attempted to create instance of a class with a numeric name'), E_USER_WARNING);
|
||||
return $false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -647,11 +647,11 @@ class Debugger {
|
|||
*/
|
||||
public static function checkSecurityKeys() {
|
||||
if (Configure::read('Security.salt') == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') {
|
||||
trigger_error(__('Please change the value of \'Security.salt\' in app/config/core.php to a salt value specific to your application'), E_USER_NOTICE);
|
||||
trigger_error(__d('cake', 'Please change the value of \'Security.salt\' in app/config/core.php to a salt value specific to your application'), E_USER_NOTICE);
|
||||
}
|
||||
|
||||
if (Configure::read('Security.cipherSeed') === '76859309657453542496749683645') {
|
||||
trigger_error(__('Please change the value of \'Security.cipherSeed\' in app/config/core.php to a numeric (digits only) seed value specific to your application'), E_USER_NOTICE);
|
||||
trigger_error(__d('cake', 'Please change the value of \'Security.cipherSeed\' in app/config/core.php to a numeric (digits only) seed value specific to your application'), E_USER_NOTICE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -345,11 +345,11 @@ class Folder {
|
|||
|
||||
if ($recursive === false && is_dir($path)) {
|
||||
if (@chmod($path, intval($mode, 8))) {
|
||||
$this->__messages[] = __('%s changed to %s', $path, $mode);
|
||||
$this->__messages[] = __d('cake', '%s changed to %s', $path, $mode);
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->__errors[] = __('%s NOT changed to %s', $path, $mode);
|
||||
$this->__errors[] = __d('cake', '%s NOT changed to %s', $path, $mode);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -366,9 +366,9 @@ class Folder {
|
|||
}
|
||||
|
||||
if (@chmod($fullpath, intval($mode, 8))) {
|
||||
$this->__messages[] = __('%s changed to %s', $fullpath, $mode);
|
||||
$this->__messages[] = __d('cake', '%s changed to %s', $fullpath, $mode);
|
||||
} else {
|
||||
$this->__errors[] = __('%s NOT changed to %s', $fullpath, $mode);
|
||||
$this->__errors[] = __d('cake', '%s NOT changed to %s', $fullpath, $mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -453,7 +453,7 @@ class Folder {
|
|||
}
|
||||
|
||||
if (is_file($pathname)) {
|
||||
$this->__errors[] = __('%s is a file', $pathname);
|
||||
$this->__errors[] = __d('cake', '%s is a file', $pathname);
|
||||
return false;
|
||||
}
|
||||
$pathname = rtrim($pathname, DS);
|
||||
|
@ -464,11 +464,11 @@ class Folder {
|
|||
$old = umask(0);
|
||||
if (mkdir($pathname, $mode)) {
|
||||
umask($old);
|
||||
$this->__messages[] = __('%s created', $pathname);
|
||||
$this->__messages[] = __d('cake', '%s created', $pathname);
|
||||
return true;
|
||||
} else {
|
||||
umask($old);
|
||||
$this->__errors[] = __('%s NOT created', $pathname);
|
||||
$this->__errors[] = __d('cake', '%s NOT created', $pathname);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -541,9 +541,9 @@ class Folder {
|
|||
}
|
||||
if (is_file($file) === true) {
|
||||
if (@unlink($file)) {
|
||||
$this->__messages[] = __('%s removed', $file);
|
||||
$this->__messages[] = __d('cake', '%s removed', $file);
|
||||
} else {
|
||||
$this->__errors[] = __('%s NOT removed', $file);
|
||||
$this->__errors[] = __d('cake', '%s NOT removed', $file);
|
||||
}
|
||||
} elseif (is_dir($file) === true && $this->delete($file) === false) {
|
||||
return false;
|
||||
|
@ -552,10 +552,10 @@ class Folder {
|
|||
}
|
||||
$path = substr($path, 0, strlen($path) - 1);
|
||||
if (rmdir($path) === false) {
|
||||
$this->__errors[] = __('%s NOT removed', $path);
|
||||
$this->__errors[] = __d('cake', '%s NOT removed', $path);
|
||||
return false;
|
||||
} else {
|
||||
$this->__messages[] = __('%s removed', $path);
|
||||
$this->__messages[] = __d('cake', '%s removed', $path);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -590,7 +590,7 @@ class Folder {
|
|||
$mode = $options['mode'];
|
||||
|
||||
if (!$this->cd($fromDir)) {
|
||||
$this->__errors[] = __('%s not found', $fromDir);
|
||||
$this->__errors[] = __d('cake', '%s not found', $fromDir);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,7 @@ class Folder {
|
|||
}
|
||||
|
||||
if (!is_writable($toDir)) {
|
||||
$this->__errors[] = __('%s not writable', $toDir);
|
||||
$this->__errors[] = __d('cake', '%s not writable', $toDir);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -613,9 +613,9 @@ class Folder {
|
|||
if (copy($from, $to)) {
|
||||
chmod($to, intval($mode, 8));
|
||||
touch($to, filemtime($from));
|
||||
$this->__messages[] = __('%s copied to %s', $from, $to);
|
||||
$this->__messages[] = __d('cake', '%s copied to %s', $from, $to);
|
||||
} else {
|
||||
$this->__errors[] = __('%s NOT copied to %s', $from, $to);
|
||||
$this->__errors[] = __d('cake', '%s NOT copied to %s', $from, $to);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -626,11 +626,11 @@ class Folder {
|
|||
$old = umask(0);
|
||||
chmod($to, $mode);
|
||||
umask($old);
|
||||
$this->__messages[] = __('%s created', $to);
|
||||
$this->__messages[] = __d('cake', '%s created', $to);
|
||||
$options = array_merge($options, array('to'=> $to, 'from'=> $from));
|
||||
$this->copy($options);
|
||||
} else {
|
||||
$this->__errors[] = __('%s not created', $to);
|
||||
$this->__errors[] = __d('cake', '%s not created', $to);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ abstract class ObjectCollection {
|
|||
$list = array_keys($this->_loaded);
|
||||
}
|
||||
if ($options['modParams'] !== false && !isset($params[$options['modParams']])) {
|
||||
throw new CakeException(__('Cannot use modParams with indexes that do not exist.'));
|
||||
throw new CakeException(__d('cake', 'Cannot use modParams with indexes that do not exist.'));
|
||||
}
|
||||
foreach ($list as $name) {
|
||||
$result = call_user_func_array(array($this->_loaded[$name], $callback), $params);
|
||||
|
|
|
@ -136,7 +136,7 @@ class Security {
|
|||
*/
|
||||
public static function cipher($text, $key) {
|
||||
if (empty($key)) {
|
||||
trigger_error(__('You cannot use an empty key for Security::cipher()'), E_USER_WARNING);
|
||||
trigger_error(__d('cake', 'You cannot use an empty key for Security::cipher()'), E_USER_WARNING);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ class Validation {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
self::$errors[] = __('You must define the $operator parameter for Validation::comparison()');
|
||||
self::$errors[] = __d('cake', 'You must define the $operator parameter for Validation::comparison()');
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
|
@ -265,7 +265,7 @@ class Validation {
|
|||
extract(self::_defaults($check));
|
||||
}
|
||||
if ($regex === null) {
|
||||
self::$errors[] = __('You must define a regular expression for Validation::custom()');
|
||||
self::$errors[] = __d('cake', 'You must define a regular expression for Validation::custom()');
|
||||
return false;
|
||||
}
|
||||
return self::_check($check, $regex);
|
||||
|
@ -724,11 +724,11 @@ class Validation {
|
|||
protected static function _pass($method, $check, $classPrefix) {
|
||||
$className = ucwords($classPrefix) . 'Validation';
|
||||
if (!class_exists($className)) {
|
||||
trigger_error(__('Could not find %s class, unable to complete validation.', $className), E_USER_WARNING);
|
||||
trigger_error(__d('cake', 'Could not find %s class, unable to complete validation.', $className), E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
if (!method_exists($className, $method)) {
|
||||
trigger_error(__('Method %s does not exist on %s unable to complete validation.', $method, $className), E_USER_WARNING);
|
||||
trigger_error(__d('cake', 'Method %s does not exist on %s unable to complete validation.', $method, $className), E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
$check = (array)$check;
|
||||
|
|
|
@ -100,9 +100,9 @@ class Xml {
|
|||
$dom->load($input);
|
||||
return $dom;
|
||||
} elseif (!is_string($input)) {
|
||||
throw new XmlException(__('Invalid input.'));
|
||||
throw new XmlException(__d('cake', 'Invalid input.'));
|
||||
}
|
||||
throw new XmlException(__('XML cannot be read.'));
|
||||
throw new XmlException(__d('cake', 'XML cannot be read.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -144,11 +144,11 @@ class Xml {
|
|||
*/
|
||||
public static function fromArray($input, $options = array()) {
|
||||
if (!is_array($input) || count($input) !== 1) {
|
||||
throw new XmlException(__('Invalid input.'));
|
||||
throw new XmlException(__d('cake', 'Invalid input.'));
|
||||
}
|
||||
$key = key($input);
|
||||
if (is_integer($key)) {
|
||||
throw new XmlException(__('The key of input must be alphanumeric'));
|
||||
throw new XmlException(__d('cake', 'The key of input must be alphanumeric'));
|
||||
}
|
||||
|
||||
if (!is_array($options)) {
|
||||
|
@ -212,7 +212,7 @@ class Xml {
|
|||
}
|
||||
} else {
|
||||
if ($key[0] === '@') {
|
||||
throw new XmlException(__('Invalid array'));
|
||||
throw new XmlException(__d('cake', 'Invalid array'));
|
||||
}
|
||||
if (array_keys($value) === range(0, count($value) - 1)) { // List
|
||||
foreach ($value as $item) {
|
||||
|
@ -225,7 +225,7 @@ class Xml {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
throw new XmlException(__('Invalid array'));
|
||||
throw new XmlException(__d('cake', 'Invalid array'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ class Xml {
|
|||
$obj = simplexml_import_dom($obj);
|
||||
}
|
||||
if (!($obj instanceof SimpleXMLElement)) {
|
||||
throw new XmlException(__('The input is not instance of SimpleXMLElement, DOMDocument or DOMNode.'));
|
||||
throw new XmlException(__d('cake', 'The input is not instance of SimpleXMLElement, DOMDocument or DOMNode.'));
|
||||
}
|
||||
$result = array();
|
||||
$namespaces = array_merge(array('' => ''), $obj->getNamespaces(true));
|
||||
|
|
Loading…
Reference in a new issue