mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Removing 'cake' domain from core.
This domain was supposed to be replaced by cake_dev. There are a number of translations that should be App land as well. Such as those in helpers. Fixes #2103
This commit is contained in:
parent
4adc042882
commit
6bf6d79979
12 changed files with 72 additions and 72 deletions
|
@ -84,7 +84,7 @@ if (!empty($failed)) {
|
|||
}
|
||||
|
||||
if (Configure::read('debug') < 1) {
|
||||
die(__d('cake', 'Debug setting does not allow access to this url.'));
|
||||
die(__d('cake_dev', 'Debug setting does not allow access to this url.'));
|
||||
}
|
||||
|
||||
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
|
||||
|
|
|
@ -81,7 +81,7 @@ if (!empty($failed)) {
|
|||
}
|
||||
|
||||
if (Configure::read('debug') < 1) {
|
||||
die(__d('cake', 'Debug setting does not allow access to this url.'));
|
||||
die(__d('cake_dev', 'Debug setting does not allow access to this url.'));
|
||||
}
|
||||
|
||||
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
|
||||
|
|
|
@ -342,7 +342,7 @@ class AuthComponent extends Component {
|
|||
protected function _setDefaults() {
|
||||
$defaults = array(
|
||||
'logoutRedirect' => $this->loginAction,
|
||||
'authError' => __d('cake', 'You are not authorized to access that location.')
|
||||
'authError' => __d('cake_dev', 'You are not authorized to access that location.')
|
||||
);
|
||||
foreach ($defaults as $key => $value) {
|
||||
if (empty($this->{$key})) {
|
||||
|
|
|
@ -125,7 +125,7 @@ class Scaffold {
|
|||
$this->ScaffoldModel = $this->controller->{$this->modelClass};
|
||||
$this->scaffoldTitle = Inflector::humanize(Inflector::underscore($this->viewPath));
|
||||
$this->scaffoldActions = $controller->scaffold;
|
||||
$title_for_layout = __d('cake', 'Scaffold :: ') . Inflector::humanize($request->action) . ' :: ' . $this->scaffoldTitle;
|
||||
$title_for_layout = __d('cake_dev', 'Scaffold :: ') . Inflector::humanize($request->action) . ' :: ' . $this->scaffoldTitle;
|
||||
$modelClass = $this->controller->modelClass;
|
||||
$primaryKey = $this->ScaffoldModel->primaryKey;
|
||||
$displayField = $this->ScaffoldModel->displayField;
|
||||
|
@ -163,7 +163,7 @@ class Scaffold {
|
|||
$this->ScaffoldModel->id = $request->params['pass'][0];
|
||||
}
|
||||
if (!$this->ScaffoldModel->exists()) {
|
||||
throw new NotFoundException(__d('cake', 'Invalid %s', Inflector::humanize($this->modelKey)));
|
||||
throw new NotFoundException(__d('cake_dev', 'Invalid %s', Inflector::humanize($this->modelKey)));
|
||||
}
|
||||
$this->ScaffoldModel->recursive = 1;
|
||||
$this->controller->request->data = $this->ScaffoldModel->read();
|
||||
|
@ -218,10 +218,10 @@ class Scaffold {
|
|||
*/
|
||||
protected function _scaffoldSave(CakeRequest $request, $action = 'edit') {
|
||||
$formAction = 'edit';
|
||||
$success = __d('cake', 'updated');
|
||||
$success = __d('cake_dev', 'updated');
|
||||
if ($action === 'add') {
|
||||
$formAction = 'add';
|
||||
$success = __d('cake', 'saved');
|
||||
$success = __d('cake_dev', 'saved');
|
||||
}
|
||||
|
||||
if ($this->controller->beforeScaffold($action)) {
|
||||
|
@ -230,7 +230,7 @@ class Scaffold {
|
|||
$this->ScaffoldModel->id = $request['pass'][0];
|
||||
}
|
||||
if (!$this->ScaffoldModel->exists()) {
|
||||
throw new NotFoundException(__d('cake', 'Invalid %s', Inflector::humanize($this->modelKey)));
|
||||
throw new NotFoundException(__d('cake_dev', 'Invalid %s', Inflector::humanize($this->modelKey)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ class Scaffold {
|
|||
|
||||
if ($this->ScaffoldModel->save($request->data)) {
|
||||
if ($this->controller->afterScaffoldSave($action)) {
|
||||
$message = __d('cake',
|
||||
$message = __d('cake_dev',
|
||||
'The %1$s has been %2$s',
|
||||
Inflector::humanize($this->modelKey),
|
||||
$success
|
||||
|
@ -252,7 +252,7 @@ class Scaffold {
|
|||
}
|
||||
} else {
|
||||
if ($this->_validSession) {
|
||||
$this->controller->Session->setFlash(__d('cake', 'Please correct errors below.'));
|
||||
$this->controller->Session->setFlash(__d('cake_dev', 'Please correct errors below.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -300,13 +300,13 @@ class Scaffold {
|
|||
}
|
||||
$this->ScaffoldModel->id = $id;
|
||||
if (!$this->ScaffoldModel->exists()) {
|
||||
throw new NotFoundException(__d('cake', 'Invalid %s', Inflector::humanize($this->modelClass)));
|
||||
throw new NotFoundException(__d('cake_dev', 'Invalid %s', Inflector::humanize($this->modelClass)));
|
||||
}
|
||||
if ($this->ScaffoldModel->delete()) {
|
||||
$message = __d('cake', 'The %1$s with id: %2$d has been deleted.', Inflector::humanize($this->modelClass), $id);
|
||||
$message = __d('cake_dev', 'The %1$s with id: %2$d has been deleted.', Inflector::humanize($this->modelClass), $id);
|
||||
return $this->_sendMessage($message);
|
||||
} else {
|
||||
$message = __d('cake',
|
||||
$message = __d('cake_dev',
|
||||
'There was an error deleting the %1$s with id: %2$d',
|
||||
Inflector::humanize($this->modelClass),
|
||||
$id
|
||||
|
|
|
@ -204,7 +204,7 @@ class ExceptionRenderer {
|
|||
public function error400($error) {
|
||||
$message = $error->getMessage();
|
||||
if (Configure::read('debug') == 0 && $error instanceof CakeException) {
|
||||
$message = __d('cake', 'Not Found');
|
||||
$message = __('Not Found');
|
||||
}
|
||||
$url = $this->controller->request->here();
|
||||
$this->controller->response->statusCode($error->getCode());
|
||||
|
@ -227,7 +227,7 @@ class ExceptionRenderer {
|
|||
$code = ($error->getCode() > 500 && $error->getCode() < 506) ? $error->getCode() : 500;
|
||||
$this->controller->response->statusCode($code);
|
||||
$this->controller->set(array(
|
||||
'name' => __d('cake', 'An Internal Error Has Occurred'),
|
||||
'name' => __('An Internal Error Has Occurred'),
|
||||
'message' => h($url),
|
||||
'error' => $error,
|
||||
));
|
||||
|
|
|
@ -295,7 +295,7 @@ class CakeEmail {
|
|||
if ($email === null) {
|
||||
return $this->_from;
|
||||
}
|
||||
return $this->_setEmailSingle('_from', $email, $name, __d('cake', 'From requires only 1 email address.'));
|
||||
return $this->_setEmailSingle('_from', $email, $name, __d('cake_dev', 'From requires only 1 email address.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -310,7 +310,7 @@ class CakeEmail {
|
|||
if ($email === null) {
|
||||
return $this->_sender;
|
||||
}
|
||||
return $this->_setEmailSingle('_sender', $email, $name, __d('cake', 'Sender requires only 1 email address.'));
|
||||
return $this->_setEmailSingle('_sender', $email, $name, __d('cake_dev', 'Sender requires only 1 email address.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -325,7 +325,7 @@ class CakeEmail {
|
|||
if ($email === null) {
|
||||
return $this->_replyTo;
|
||||
}
|
||||
return $this->_setEmailSingle('_replyTo', $email, $name, __d('cake', 'Reply-To requires only 1 email address.'));
|
||||
return $this->_setEmailSingle('_replyTo', $email, $name, __d('cake_dev', 'Reply-To requires only 1 email address.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -340,7 +340,7 @@ class CakeEmail {
|
|||
if ($email === null) {
|
||||
return $this->_readReceipt;
|
||||
}
|
||||
return $this->_setEmailSingle('_readReceipt', $email, $name, __d('cake', 'Disposition-Notification-To requires only 1 email address.'));
|
||||
return $this->_setEmailSingle('_readReceipt', $email, $name, __d('cake_dev', 'Disposition-Notification-To requires only 1 email address.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -355,7 +355,7 @@ class CakeEmail {
|
|||
if ($email === null) {
|
||||
return $this->_returnPath;
|
||||
}
|
||||
return $this->_setEmailSingle('_returnPath', $email, $name, __d('cake', 'Return-Path requires only 1 email address.'));
|
||||
return $this->_setEmailSingle('_returnPath', $email, $name, __d('cake_dev', 'Return-Path requires only 1 email address.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -445,7 +445,7 @@ class CakeEmail {
|
|||
protected function _setEmail($varName, $email, $name) {
|
||||
if (!is_array($email)) {
|
||||
if (!Validation::email($email)) {
|
||||
throw new SocketException(__d('cake', 'Invalid email: "%s"', $email));
|
||||
throw new SocketException(__d('cake_dev', 'Invalid email: "%s"', $email));
|
||||
}
|
||||
if ($name === null) {
|
||||
$name = $email;
|
||||
|
@ -459,7 +459,7 @@ class CakeEmail {
|
|||
$key = $value;
|
||||
}
|
||||
if (!Validation::email($key)) {
|
||||
throw new SocketException(__d('cake', 'Invalid email: "%s"', $key));
|
||||
throw new SocketException(__d('cake_dev', 'Invalid email: "%s"', $key));
|
||||
}
|
||||
$list[$key] = $value;
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ class CakeEmail {
|
|||
protected function _addEmail($varName, $email, $name) {
|
||||
if (!is_array($email)) {
|
||||
if (!Validation::email($email)) {
|
||||
throw new SocketException(__d('cake', 'Invalid email: "%s"', $email));
|
||||
throw new SocketException(__d('cake_dev', 'Invalid email: "%s"', $email));
|
||||
}
|
||||
if ($name === null) {
|
||||
$name = $email;
|
||||
|
@ -513,7 +513,7 @@ class CakeEmail {
|
|||
$key = $value;
|
||||
}
|
||||
if (!Validation::email($key)) {
|
||||
throw new SocketException(__d('cake', 'Invalid email: "%s"', $key));
|
||||
throw new SocketException(__d('cake_dev', 'Invalid email: "%s"', $key));
|
||||
}
|
||||
$list[$key] = $value;
|
||||
}
|
||||
|
@ -544,7 +544,7 @@ class CakeEmail {
|
|||
*/
|
||||
public function setHeaders($headers) {
|
||||
if (!is_array($headers)) {
|
||||
throw new SocketException(__d('cake', '$headers should be an array.'));
|
||||
throw new SocketException(__d('cake_dev', '$headers should be an array.'));
|
||||
}
|
||||
$this->_headers = $headers;
|
||||
return $this;
|
||||
|
@ -559,7 +559,7 @@ class CakeEmail {
|
|||
*/
|
||||
public function addHeaders($headers) {
|
||||
if (!is_array($headers)) {
|
||||
throw new SocketException(__d('cake', '$headers should be an array.'));
|
||||
throw new SocketException(__d('cake_dev', '$headers should be an array.'));
|
||||
}
|
||||
$this->_headers = array_merge($this->_headers, $headers);
|
||||
return $this;
|
||||
|
@ -744,7 +744,7 @@ class CakeEmail {
|
|||
return $this->_emailFormat;
|
||||
}
|
||||
if (!in_array($format, $this->_emailFormatAvailable)) {
|
||||
throw new SocketException(__d('cake', 'Format not available.'));
|
||||
throw new SocketException(__d('cake_dev', 'Format not available.'));
|
||||
}
|
||||
$this->_emailFormat = $format;
|
||||
return $this;
|
||||
|
@ -779,9 +779,9 @@ class CakeEmail {
|
|||
$transportClassname .= 'Transport';
|
||||
App::uses($transportClassname, $plugin . 'Network/Email');
|
||||
if (!class_exists($transportClassname)) {
|
||||
throw new SocketException(__d('cake', 'Class "%s" not found.', $transportClassname));
|
||||
throw new SocketException(__d('cake_dev', 'Class "%s" not found.', $transportClassname));
|
||||
} elseif (!method_exists($transportClassname, 'send')) {
|
||||
throw new SocketException(__d('cake', 'The "%s" do not have send method.', $transportClassname));
|
||||
throw new SocketException(__d('cake_dev', 'The "%s" do not have send method.', $transportClassname));
|
||||
}
|
||||
|
||||
return $this->_transportClass = new $transportClassname();
|
||||
|
@ -802,7 +802,7 @@ class CakeEmail {
|
|||
$this->_messageId = $message;
|
||||
} else {
|
||||
if (!preg_match('/^\<.+@.+\>$/', $message)) {
|
||||
throw new SocketException(__d('cake', 'Invalid format to Message-ID. The text should be something like "<uuid@server.com>"'));
|
||||
throw new SocketException(__d('cake_dev', 'Invalid format to Message-ID. The text should be something like "<uuid@server.com>"'));
|
||||
}
|
||||
$this->_messageId = $message;
|
||||
}
|
||||
|
@ -826,11 +826,11 @@ class CakeEmail {
|
|||
$fileInfo = array('file' => $fileInfo);
|
||||
}
|
||||
if (!isset($fileInfo['file'])) {
|
||||
throw new SocketException(__d('cake', 'File not specified.'));
|
||||
throw new SocketException(__d('cake_dev', 'File not specified.'));
|
||||
}
|
||||
$fileInfo['file'] = realpath($fileInfo['file']);
|
||||
if ($fileInfo['file'] === false || !file_exists($fileInfo['file'])) {
|
||||
throw new SocketException(__d('cake', 'File not found: "%s"', $fileInfo['file']));
|
||||
throw new SocketException(__d('cake_dev', 'File not found: "%s"', $fileInfo['file']));
|
||||
}
|
||||
if (is_int($name)) {
|
||||
$name = basename($fileInfo['file']);
|
||||
|
@ -900,10 +900,10 @@ class CakeEmail {
|
|||
*/
|
||||
public function send($content = null) {
|
||||
if (empty($this->_from)) {
|
||||
throw new SocketException(__d('cake', 'From is not specified.'));
|
||||
throw new SocketException(__d('cake_dev', 'From is not specified.'));
|
||||
}
|
||||
if (empty($this->_to) && empty($this->_cc) && empty($this->_bcc)) {
|
||||
throw new SocketException(__d('cake', 'You need specify one destination on to, cc or bcc.'));
|
||||
throw new SocketException(__d('cake_dev', 'You need specify one destination on to, cc or bcc.'));
|
||||
}
|
||||
|
||||
if (is_array($content)) {
|
||||
|
@ -994,11 +994,11 @@ class CakeEmail {
|
|||
protected function _applyConfig($config) {
|
||||
if (is_string($config)) {
|
||||
if (!class_exists('EmailConfig') && !config('email')) {
|
||||
throw new SocketException(__d('cake', '%s not found.', APP . 'Config' . DS . 'email.php'));
|
||||
throw new SocketException(__d('cake_dev', '%s not found.', APP . 'Config' . DS . 'email.php'));
|
||||
}
|
||||
$configs = new EmailConfig();
|
||||
if (!isset($configs->{$config})) {
|
||||
throw new SocketException(__d('cake', 'Unknown email configuration "%s".', $config));
|
||||
throw new SocketException(__d('cake_dev', 'Unknown email configuration "%s".', $config));
|
||||
}
|
||||
$config = $configs->{$config};
|
||||
}
|
||||
|
|
|
@ -42,10 +42,10 @@ class MailTransport extends AbstractTransport {
|
|||
$message = implode($eol, $email->message());
|
||||
if (ini_get('safe_mode') || !isset($this->_config['additionalParameters'])) {
|
||||
if (!@mail($to, $email->subject(), $message, $headers)) {
|
||||
throw new SocketException(__d('cake', 'Could not send email.'));
|
||||
throw new SocketException(__d('cake_dev', 'Could not send email.'));
|
||||
}
|
||||
} elseif (!@mail($to, $email->subject(), $message, $headers, $this->_config['additionalParameters'])) {
|
||||
throw new SocketException(__d('cake', 'Could not send email.'));
|
||||
throw new SocketException(__d('cake_dev', 'Could not send email.'));
|
||||
}
|
||||
return array('headers' => $headers, 'message' => $message);
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ class SmtpTransport extends AbstractTransport {
|
|||
protected function _connect() {
|
||||
$this->_generateSocket();
|
||||
if (!$this->_socket->connect()) {
|
||||
throw new SocketException(__d('cake', 'Unable to connect in SMTP server.'));
|
||||
throw new SocketException(__d('cake_dev', 'Unable to connect to SMTP server.'));
|
||||
}
|
||||
$this->_smtpSend(null, '220');
|
||||
|
||||
|
@ -110,7 +110,7 @@ class SmtpTransport extends AbstractTransport {
|
|||
try {
|
||||
$this->_smtpSend("HELO {$host}", '250');
|
||||
} catch (SocketException $e2) {
|
||||
throw new SocketException(__d('cake', 'SMTP server not accepted the connection.'));
|
||||
throw new SocketException(__d('cake_dev', 'SMTP server did not accept the connection.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,13 +126,13 @@ class SmtpTransport extends AbstractTransport {
|
|||
$authRequired = $this->_smtpSend('AUTH LOGIN', '334|503');
|
||||
if ($authRequired == '334') {
|
||||
if (!$this->_smtpSend(base64_encode($this->_config['username']), '334')) {
|
||||
throw new SocketException(__d('cake', 'SMTP server not accepted the username.'));
|
||||
throw new SocketException(__d('cake_dev', 'SMTP server did not accept the username.'));
|
||||
}
|
||||
if (!$this->_smtpSend(base64_encode($this->_config['password']), '235')) {
|
||||
throw new SocketException(__d('cake', 'SMTP server not accepted the password.'));
|
||||
throw new SocketException(__d('cake_dev', 'SMTP server did not accept the password.'));
|
||||
}
|
||||
} elseif ($authRequired != '503') {
|
||||
throw new SocketException(__d('cake', 'SMTP do not require authentication.'));
|
||||
throw new SocketException(__d('cake_dev', 'SMTP does not require authentication.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ class SmtpTransport extends AbstractTransport {
|
|||
$response .= $this->_socket->read();
|
||||
}
|
||||
if (substr($response, -2) !== "\r\n") {
|
||||
throw new SocketException(__d('cake', 'SMTP timeout.'));
|
||||
throw new SocketException(__d('cake_dev', 'SMTP timeout.'));
|
||||
}
|
||||
$response = end(explode("\r\n", rtrim($response, "\r\n")));
|
||||
|
||||
|
@ -222,7 +222,7 @@ class SmtpTransport extends AbstractTransport {
|
|||
}
|
||||
return $code[1];
|
||||
}
|
||||
throw new SocketException(__d('cake', 'SMTP Error: %s', $response));
|
||||
throw new SocketException(__d('cake_dev', 'SMTP Error: %s', $response));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -683,7 +683,7 @@ class FormHelper extends AppHelper {
|
|||
if (is_array($error)) {
|
||||
foreach ($error as &$e) {
|
||||
if (is_numeric($e)) {
|
||||
$e = __d('cake', 'Error in field %s', Inflector::humanize($this->field()));
|
||||
$e = __('Error in field %s', Inflector::humanize($this->field()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -752,7 +752,7 @@ class FormHelper extends AppHelper {
|
|||
if (substr($text, -3) == '_id') {
|
||||
$text = substr($text, 0, strlen($text) - 3);
|
||||
}
|
||||
$text = __d('cake', Inflector::humanize(Inflector::underscore($text)));
|
||||
$text = __(Inflector::humanize(Inflector::underscore($text)));
|
||||
}
|
||||
|
||||
if (is_string($options)) {
|
||||
|
@ -821,13 +821,13 @@ class FormHelper extends AppHelper {
|
|||
}
|
||||
|
||||
if ($legend === true) {
|
||||
$actionName = __d('cake', 'New %s');
|
||||
$actionName = __('New %s');
|
||||
$isEdit = (
|
||||
strpos($this->request->params['action'], 'update') !== false ||
|
||||
strpos($this->request->params['action'], 'edit') !== false
|
||||
);
|
||||
if ($isEdit) {
|
||||
$actionName = __d('cake', 'Edit %s');
|
||||
$actionName = __('Edit %s');
|
||||
}
|
||||
$modelName = Inflector::humanize(Inflector::underscore($model));
|
||||
$legend = sprintf($actionName, __($modelName));
|
||||
|
@ -1582,7 +1582,7 @@ class FormHelper extends AppHelper {
|
|||
*/
|
||||
public function submit($caption = null, $options = array()) {
|
||||
if (!is_string($caption) && empty($caption)) {
|
||||
$caption = __d('cake', 'Submit');
|
||||
$caption = __('Submit');
|
||||
}
|
||||
$out = null;
|
||||
$div = true;
|
||||
|
@ -2434,18 +2434,18 @@ class FormHelper extends AppHelper {
|
|||
break;
|
||||
case 'month':
|
||||
if ($options['monthNames'] === true) {
|
||||
$data['01'] = __d('cake', 'January');
|
||||
$data['02'] = __d('cake', 'February');
|
||||
$data['03'] = __d('cake', 'March');
|
||||
$data['04'] = __d('cake', 'April');
|
||||
$data['05'] = __d('cake', 'May');
|
||||
$data['06'] = __d('cake', 'June');
|
||||
$data['07'] = __d('cake', 'July');
|
||||
$data['08'] = __d('cake', 'August');
|
||||
$data['09'] = __d('cake', 'September');
|
||||
$data['10'] = __d('cake', 'October');
|
||||
$data['11'] = __d('cake', 'November');
|
||||
$data['12'] = __d('cake', 'December');
|
||||
$data['01'] = __('January');
|
||||
$data['02'] = __('February');
|
||||
$data['03'] = __('March');
|
||||
$data['04'] = __('April');
|
||||
$data['05'] = __('May');
|
||||
$data['06'] = __('June');
|
||||
$data['07'] = __('July');
|
||||
$data['08'] = __('August');
|
||||
$data['09'] = __('September');
|
||||
$data['10'] = __('October');
|
||||
$data['11'] = __('November');
|
||||
$data['12'] = __('December');
|
||||
} else if (is_array($options['monthNames'])) {
|
||||
$data = $options['monthNames'];
|
||||
} else {
|
||||
|
|
|
@ -86,13 +86,13 @@ class NumberHelper extends AppHelper {
|
|||
case $size < 1024:
|
||||
return __dn('cake', '%d Byte', '%d Bytes', $size, $size);
|
||||
case round($size / 1024) < 1024:
|
||||
return __d('cake', '%d KB', $this->precision($size / 1024, 0));
|
||||
return __('%d KB', $this->precision($size / 1024, 0));
|
||||
case round($size / 1024 / 1024, 2) < 1024:
|
||||
return __d('cake', '%.2f MB', $this->precision($size / 1024 / 1024, 2));
|
||||
return __('%.2f MB', $this->precision($size / 1024 / 1024, 2));
|
||||
case round($size / 1024 / 1024 / 1024, 2) < 1024:
|
||||
return __d('cake', '%.2f GB', $this->precision($size / 1024 / 1024 / 1024, 2));
|
||||
return __('%.2f GB', $this->precision($size / 1024 / 1024 / 1024, 2));
|
||||
default:
|
||||
return __d('cake', '%.2f TB', $this->precision($size / 1024 / 1024 / 1024 / 1024, 2));
|
||||
return __('%.2f TB', $this->precision($size / 1024 / 1024 / 1024 / 1024, 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -557,7 +557,7 @@ class PaginatorHelper extends AppHelper {
|
|||
array(
|
||||
'model' => $this->defaultModel(),
|
||||
'format' => 'pages',
|
||||
'separator' => __d('cake', ' of ')
|
||||
'separator' => __(' of ')
|
||||
),
|
||||
$options);
|
||||
|
||||
|
|
|
@ -260,9 +260,9 @@ class TimeHelper extends AppHelper {
|
|||
$y = $this->isThisYear($date) ? '' : ' %Y';
|
||||
|
||||
if ($this->isToday($dateString, $userOffset)) {
|
||||
$ret = __d('cake', 'Today, %s', strftime("%H:%M", $date));
|
||||
$ret = __('Today, %s', strftime("%H:%M", $date));
|
||||
} elseif ($this->wasYesterday($dateString, $userOffset)) {
|
||||
$ret = __d('cake', 'Yesterday, %s', strftime("%H:%M", $date));
|
||||
$ret = __('Yesterday, %s', strftime("%H:%M", $date));
|
||||
} else {
|
||||
$format = $this->convertSpecifiers("%b %eS{$y}, %H:%M", $date);
|
||||
$ret = strftime($format, $date);
|
||||
|
@ -609,7 +609,7 @@ class TimeHelper extends AppHelper {
|
|||
$diff = $futureTime - $pastTime;
|
||||
|
||||
if ($diff > abs($now - $this->fromString($end))) {
|
||||
$relativeDate = __d('cake', 'on %s', date($format, $inSeconds));
|
||||
$relativeDate = __('on %s', date($format, $inSeconds));
|
||||
} else {
|
||||
if ($years > 0) {
|
||||
// years and months and days
|
||||
|
@ -643,7 +643,7 @@ class TimeHelper extends AppHelper {
|
|||
}
|
||||
|
||||
if (!$backwards) {
|
||||
$relativeDate = __d('cake', '%s ago', $relativeDate);
|
||||
$relativeDate = __('%s ago', $relativeDate);
|
||||
}
|
||||
}
|
||||
return $relativeDate;
|
||||
|
@ -662,7 +662,7 @@ class TimeHelper extends AppHelper {
|
|||
public function wasWithinLast($timeInterval, $dateString, $userOffset = null) {
|
||||
$tmp = str_replace(' ', '', $timeInterval);
|
||||
if (is_numeric($tmp)) {
|
||||
$timeInterval = $tmp . ' ' . __d('cake', 'days');
|
||||
$timeInterval = $tmp . ' ' . __('days');
|
||||
}
|
||||
|
||||
$date = $this->fromString($dateString, $userOffset);
|
||||
|
|
Loading…
Add table
Reference in a new issue