Permalink
Browse files

Excluded method names from several tanslation strings

Removed unnecessary sprintfs
  • Loading branch information...
1 parent c5a306b commit 56ef44f495645945da71fc9e3217aecd59af68aa @dmromanov dmromanov committed Aug 16, 2013
@@ -165,7 +165,7 @@ public function read($key) {
public function increment($key, $offset = 1) {
if ($this->settings['compress']) {
throw new CacheException(
- __d('cake_dev', 'Method increment() not implemented for compressed cache in %s', __CLASS__)
+ __d('cake_dev', 'Method %s not implemented for compressed cache in %s', 'increment()', __CLASS__)
);
}
return $this->_Memcache->increment($key, $offset);
@@ -182,7 +182,7 @@ public function increment($key, $offset = 1) {
public function decrement($key, $offset = 1) {
if ($this->settings['compress']) {
throw new CacheException(
- __d('cake_dev', 'Method decrement() not implemented for compressed cache in %s', __CLASS__)
+ __d('cake_dev', 'Method %s not implemented for compressed cache in %s', 'decrement()', __CLASS__)
);
}
return $this->_Memcache->decrement($key, $offset);
@@ -159,7 +159,7 @@ public function inherit($aro, $aco, $action = "*") {
* @deprecated Will be removed in 3.0.
*/
public function grant($aro, $aco, $action = "*") {
- trigger_error(__d('cake_dev', 'AclComponent::grant() is deprecated, use allow() instead'), E_USER_WARNING);
+ trigger_error(__d('cake_dev', '%s is deprecated, use %s instead', 'AclComponent::grant()', 'allow()'), E_USER_WARNING);
return $this->_Instance->allow($aro, $aco, $action);
}
@@ -173,7 +173,7 @@ public function grant($aro, $aco, $action = "*") {
* @deprecated Will be removed in 3.0.
*/
public function revoke($aro, $aco, $action = "*") {
- trigger_error(__d('cake_dev', 'AclComponent::revoke() is deprecated, use deny() instead'), E_USER_WARNING);
+ trigger_error(__d('cake_dev', '%s is deprecated, use %s instead', 'AclComponent::revoke()', 'deny()'), E_USER_WARNING);
return $this->_Instance->deny($aro, $aco, $action);
}
@@ -495,7 +495,7 @@ public function constructAuthorize() {
throw new CakeException(__d('cake_dev', 'Authorization adapter "%s" was not found.', $class));
}
if (!method_exists($className, 'authorize')) {
- throw new CakeException(__d('cake_dev', 'Authorization objects must implement an authorize method.'));
+ throw new CakeException(__d('cake_dev', 'Authorization objects must implement an %s method.', 'authorize'));
}
$settings = array_merge($global, (array)$settings);
$this->_authorizeObjects[] = new $className($this->_Collection, $settings);
@@ -784,7 +784,7 @@ public function constructAuthenticate() {
throw new CakeException(__d('cake_dev', 'Authentication adapter "%s" was not found.', $class));
}
if (!method_exists($className, 'authenticate')) {
- throw new CakeException(__d('cake_dev', 'Authentication objects must implement an authenticate method.'));
+ throw new CakeException(__d('cake_dev', 'Authentication objects must implement an %s method.', 'authenticate'));
}
$settings = array_merge($global, (array)$settings);
$this->_authenticateObjects[] = new $className($this->_Collection, $settings);
@@ -42,9 +42,9 @@ public function load($name, $options = array()) {
$className = $this->_getLogger($loggerName);
$logger = new $className($options);
if (!$logger instanceof CakeLogInterface) {
- throw new CakeLogException(sprintf(
- __d('cake_dev', 'logger class %s does not implement a write method.'), $loggerName
- ));
+ throw new CakeLogException(
+ __d('cake_dev', 'logger class %s does not implement a %s method.', $loggerName, 'write()')
+ );
}
$this->_loaded[$name] = $logger;
if ($enable) {
@@ -486,10 +486,10 @@ protected static function _configureSession() {
if (!empty($sessionConfig['ini']) && is_array($sessionConfig['ini'])) {
foreach ($sessionConfig['ini'] as $setting => $value) {
if (ini_set($setting, $value) === false) {
- throw new CakeSessionException(sprintf(
- __d('cake_dev', 'Unable to configure the session, setting %s failed.'),
- $setting
- ));
+ throw new CakeSessionException(
+ __d('cake_dev', 'Unable to configure the session, setting %s failed.',
+ $setting)
+ );
}
}
}
@@ -906,7 +906,7 @@ public function transportClass() {
if (!class_exists($transportClassname)) {
throw new SocketException(__d('cake_dev', 'Class "%s" not found.', $transportClassname));
} elseif (!method_exists($transportClassname, 'send')) {
- throw new SocketException(__d('cake_dev', 'The "%s" do not have send method.', $transportClassname));
+ throw new SocketException(__d('cake_dev', 'The "%s" does not have a %s method.', $transportClassname, 'send()'));
}
return $this->_transportClass = new $transportClassname();
@@ -604,7 +604,7 @@ protected function _setAuth() {
throw new SocketException(__d('cake_dev', 'Unknown authentication method.'));
}
if (!method_exists($authClass, 'authentication')) {
- throw new SocketException(sprintf(__d('cake_dev', 'The %s do not support authentication.'), $authClass));
+ throw new SocketException(__d('cake_dev', 'The %s do not support authentication.', $authClass));
}
call_user_func_array("$authClass::authentication", array($this, &$this->_auth[$method]));
}
@@ -633,7 +633,7 @@ protected function _setProxy() {
throw new SocketException(__d('cake_dev', 'Unknown authentication method for proxy.'));
}
if (!method_exists($authClass, 'proxyAuthentication')) {
- throw new SocketException(sprintf(__d('cake_dev', 'The %s do not support proxy authentication.'), $authClass));
+ throw new SocketException(__d('cake_dev', 'The %s do not support proxy authentication.', $authClass));
}
call_user_func_array("$authClass::proxyAuthentication", array($this, &$this->_proxy));
}
@@ -184,7 +184,7 @@ public static function setCost($cost) {
*/
public static function cipher($text, $key) {
if (empty($key)) {
- trigger_error(__d('cake_dev', 'You cannot use an empty key for Security::cipher()'), E_USER_WARNING);
+ trigger_error(__d('cake_dev', 'You cannot use an empty key for %s', 'Security::cipher()'), E_USER_WARNING);
return '';
}
@@ -217,7 +217,7 @@ public static function cipher($text, $key) {
*/
public static function rijndael($text, $key, $operation) {
if (empty($key)) {
- trigger_error(__d('cake_dev', 'You cannot use an empty key for Security::rijndael()'), E_USER_WARNING);
+ trigger_error(__d('cake_dev', 'You cannot use an empty key for %s', 'Security::rijndael()'), E_USER_WARNING);
return '';
}
if (empty($operation) || !in_array($operation, array('encrypt', 'decrypt'))) {
@@ -95,9 +95,9 @@ public function __construct(View $View, $settings = array()) {
App::uses($ajaxProvider . 'Helper', 'View/Helper');
$classname = $ajaxProvider . 'Helper';
if (!class_exists($classname) || !method_exists($classname, 'link')) {
- throw new CakeException(sprintf(
- __d('cake_dev', '%s does not implement a link() method, it is incompatible with PaginatorHelper'), $classname
- ));
+ throw new CakeException(
+ __d('cake_dev', '%s does not implement a link() method, it is incompatible with PaginatorHelper', $classname)
+ );
}
parent::__construct($View, $settings);
}

0 comments on commit 56ef44f

Please sign in to comment.