mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Converted views, router and security classes to new translation shotcut function use.
This commit is contained in:
parent
6bd9f0f05b
commit
c98021dcd8
37 changed files with 263 additions and 263 deletions
|
@ -44,7 +44,7 @@ class Overloadable extends Object {
|
|||
*/
|
||||
function __call($method, $params) {
|
||||
if (!method_exists($this, 'call__')) {
|
||||
trigger_error(sprintf(__('Magic method handler call__ not defined in %s', true), get_class($this)), E_USER_ERROR);
|
||||
trigger_error(sprintf(__('Magic method handler call__ not defined in %s'), get_class($this)), E_USER_ERROR);
|
||||
}
|
||||
return $this->call__($method, $params);
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ class Router {
|
|||
//TODO 2.0 refactor this to use a string class name, throw exception, and then construct.
|
||||
$Route =& new $routeClass($route, $defaults, $options);
|
||||
if ($routeClass !== 'CakeRoute' && !is_subclass_of($Route, 'CakeRoute')) {
|
||||
trigger_error(__('Route classes must extend CakeRoute', true), E_USER_WARNING);
|
||||
trigger_error(__('Route classes must extend CakeRoute'), E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
$self->routes[] =& $Route;
|
||||
|
|
|
@ -170,7 +170,7 @@ class Security extends Object {
|
|||
*/
|
||||
public static function cipher($text, $key) {
|
||||
if (empty($key)) {
|
||||
trigger_error(__('You cannot use an empty key for Security::cipher()', true), E_USER_WARNING);
|
||||
trigger_error(__('You cannot use an empty key for Security::cipher()'), E_USER_WARNING);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -334,7 +334,7 @@ class Validation extends Object {
|
|||
break;
|
||||
default:
|
||||
$_this =& Validation::getInstance();
|
||||
$_this->errors[] = __('You must define the $operator parameter for Validation::comparison()', true);
|
||||
$_this->errors[] = __('You must define the $operator parameter for Validation::comparison()');
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
|
@ -357,7 +357,7 @@ class Validation extends Object {
|
|||
$_this->_extract($check);
|
||||
}
|
||||
if ($_this->regex === null) {
|
||||
$_this->errors[] = __('You must define a regular expression for Validation::custom()', true);
|
||||
$_this->errors[] = __('You must define a regular expression for Validation::custom()');
|
||||
return false;
|
||||
}
|
||||
return $_this->_check();
|
||||
|
@ -894,11 +894,11 @@ class Validation extends Object {
|
|||
protected function _pass($method, $check, $classPrefix) {
|
||||
$className = ucwords($classPrefix) . 'Validation';
|
||||
if (!class_exists($className)) {
|
||||
trigger_error(sprintf(__('Could not find %s class, unable to complete validation.', true), $className), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('Could not find %s class, unable to complete validation.'), $className), E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
if (!is_callable(array($className, $method))) {
|
||||
trigger_error(sprintf(__('Method %s does not exist on %s unable to complete validation.', true), $method, $className), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('Method %s does not exist on %s unable to complete validation.'), $method, $className), E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
$check = (array)$check;
|
||||
|
|
|
@ -19,6 +19,6 @@
|
|||
?>
|
||||
<h2><?php echo $name; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('The requested address %s was not found on this server.', true), "<strong>'{$message}'</strong>"); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('The requested address %s was not found on this server.'), "<strong>'{$message}'</strong>"); ?>
|
||||
</p>
|
|
@ -19,6 +19,6 @@
|
|||
?>
|
||||
<h2><?php echo $name; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('An Internal Error Has Occurred.', true), "<strong>'{$message}'</strong>"); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('An Internal Error Has Occurred.'), "<strong>'{$message}'</strong>"); ?>
|
||||
</p>
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php printf(__('Missing Method in %s', true), $controller); ?></h2>
|
||||
<h2><?php printf(__('Missing Method in %s'), $controller); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('The action %1$s is not defined in controller %2$s', true), '<em>' . $action . '</em>', '<em>' . $controller . '</em>'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('The action %1$s is not defined in controller %2$s'), '<em>' . $action . '</em>', '<em>' . $controller . '</em>'); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create %1$s%2$s in file: %3$s.', true), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create %1$s%2$s in file: %3$s.'), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
@ -41,6 +41,6 @@ class <?php echo $controller;?> extends AppController {
|
|||
?>
|
||||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_action.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s.'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_action.ctp'); ?>
|
||||
</p>
|
|
@ -19,12 +19,12 @@
|
|||
?>
|
||||
<h2><?php __('Missing Behavior Class'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('The behavior class <em>%s</em> can not be found or does not exist.', true), $behaviorClass); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('The behavior class <em>%s</em> can not be found or does not exist.'), $behaviorClass); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class below in file: %s', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class below in file: %s'), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
@ -34,6 +34,6 @@ class <?php echo $behaviorClass;?> extends ModelBehavior {
|
|||
?>
|
||||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_class.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_class.ctp'); ?>
|
||||
</p>
|
|
@ -17,14 +17,14 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Behavior File'); ?></h2>
|
||||
<h2><?php echo __('Missing Behavior File'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('The Behavior file %s can not be found or does not exist.', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('The Behavior file %s can not be found or does not exist.'), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class below in file: %s', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class below in file: %s'), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
@ -34,6 +34,6 @@ class <?php echo $behaviorClass;?> extends ModelBehavior {
|
|||
?>
|
||||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_file.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_file.ctp'); ?>
|
||||
</p>
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Component Class'); ?></h2>
|
||||
<h2><?php echo __('Missing Component Class'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Component class %1$s in %2$s was not found.', true), '<em>' . $component . 'Component</em>', '<em>' . $controller . 'Controller</em>'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Component class %1$s in %2$s was not found.'), '<em>' . $component . 'Component</em>', '<em>' . $controller . 'Controller</em>'); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class %s in file: %s', true), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class %s in file: %s'), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
@ -34,6 +34,6 @@ class <?php echo $component;?>Component extends Object {<br />
|
|||
?>
|
||||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_class.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_class.ctp'); ?>
|
||||
</p>
|
|
@ -17,14 +17,14 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Component File'); ?></h2>
|
||||
<h2><?php echo __('Missing Component File'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php __('The component file was not found.'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php echo __('The component file was not found.'); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class %s in file: %s', true), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class %s in file: %s'), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
@ -34,6 +34,6 @@ class <?php echo $component;?>Component extends Object {<br />
|
|||
?>
|
||||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_file.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_file.ctp'); ?>
|
||||
</p>
|
|
@ -17,16 +17,16 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Database Connection'); ?></h2>
|
||||
<h2><?php echo __('Missing Database Connection'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('%s requires a database connection', true), $model); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('%s requires a database connection'), $model); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Confirm you have created the file : %s.', true), APP_DIR . DS . 'config' . DS . 'database.php'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Confirm you have created the file : %s.'), APP_DIR . DS . 'config' . DS . 'database.php'); ?>
|
||||
</p>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . basename(__FILE__)); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s.'), APP_DIR . DS . 'views' . DS . 'errors' . DS . basename(__FILE__)); ?>
|
||||
</p>
|
|
@ -17,14 +17,14 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Controller'); ?></h2>
|
||||
<h2><?php echo __('Missing Controller'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('%s could not be found.', true), '<em>' . $controller . '</em>'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('%s could not be found.'), '<em>' . $controller . '</em>'); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class %s below in file: %s', true), '<em>' . $controller . '</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class %s below in file: %s'), '<em>' . $controller . '</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
@ -35,6 +35,6 @@ class <?php echo $controller;?> extends AppController {
|
|||
?>
|
||||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_controller.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_controller.ctp'); ?>
|
||||
</p>
|
|
@ -17,14 +17,14 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Helper Class'); ?></h2>
|
||||
<h2><?php echo __('Missing Helper Class'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('The helper class <em>%s</em> can not be found or does not exist.', true), $helperClass); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('The helper class <em>%s</em> can not be found or does not exist.'), $helperClass); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class below in file: %s', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class below in file: %s'), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
@ -34,6 +34,6 @@ class <?php echo $helperClass;?> extends AppHelper {
|
|||
?>
|
||||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_class.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_class.ctp'); ?>
|
||||
</p>
|
|
@ -17,14 +17,14 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Helper File'); ?></h2>
|
||||
<h2><?php echo __('Missing Helper File'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('The helper file %s can not be found or does not exist.', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('The helper file %s can not be found or does not exist.'), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class below in file: %s', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class below in file: %s'), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
@ -34,6 +34,6 @@ class <?php echo $helperClass;?> extends AppHelper {
|
|||
?>
|
||||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_file.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_file.ctp'); ?>
|
||||
</p>
|
||||
|
|
|
@ -17,16 +17,16 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Layout'); ?></h2>
|
||||
<h2><?php echo __('Missing Layout'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('The layout file %s can not be found or does not exist.', true), '<em>' . $file . '</em>'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('The layout file %s can not be found or does not exist.'), '<em>' . $file . '</em>'); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Confirm you have created the file: %s', true), '<em>' . $file . '</em>'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Confirm you have created the file: %s'), '<em>' . $file . '</em>'); ?>
|
||||
</p>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_layout.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_layout.ctp'); ?>
|
||||
</p>
|
|
@ -17,14 +17,14 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Model'); ?></h2>
|
||||
<h2><?php echo __('Missing Model'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('<em>%s</em> could not be found.', true), $model); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('<em>%s</em> could not be found.'), $model); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class %s in file: %s', true), '<em>' . $model . '</em>', APP_DIR . DS . 'models' . DS . Inflector::underscore($model) . '.php'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Create the class %s in file: %s'), '<em>' . $model . '</em>', APP_DIR . DS . 'models' . DS . Inflector::underscore($model) . '.php'); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
@ -36,6 +36,6 @@ class <?php echo $model;?> extends AppModel {
|
|||
?>
|
||||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_model.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_model.ctp'); ?>
|
||||
</p>
|
|
@ -17,16 +17,16 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Database Connection'); ?></h2>
|
||||
<h2><?php echo __('Missing Database Connection'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php __('Scaffold requires a database connection'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php echo __('Scaffold requires a database connection'); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Confirm you have created the file: %s', true), APP_DIR . DS . 'config' . DS . 'database.php'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Confirm you have created the file: %s'), APP_DIR . DS . 'config' . DS . 'database.php'); ?>
|
||||
</p>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_scaffolddb.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_scaffolddb.ctp'); ?>
|
||||
</p>
|
|
@ -17,12 +17,12 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing Database Table'); ?></h2>
|
||||
<h2><?php echo __('Missing Database Table'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Database table %1$s for model %2$s was not found.', true), '<em>' . $table . '</em>', '<em>' . $model . '</em>'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Database table %1$s for model %2$s was not found.'), '<em>' . $table . '</em>', '<em>' . $model . '</em>'); ?>
|
||||
</p>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_table.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_table.ctp'); ?>
|
||||
</p>
|
|
@ -17,16 +17,16 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Missing View'); ?></h2>
|
||||
<h2><?php echo __('Missing View'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('The view for %1$s%2$s was not found.', true), '<em>' . $controller . 'Controller::</em>', '<em>' . $action . '()</em>'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('The view for %1$s%2$s was not found.'), '<em>' . $controller . 'Controller::</em>', '<em>' . $action . '()</em>'); ?>
|
||||
</p>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('Confirm you have created the file: %s', true), $file); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('Confirm you have created the file: %s'), $file); ?>
|
||||
</p>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_view.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_view.ctp'); ?>
|
||||
</p>
|
|
@ -17,12 +17,12 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php printf(__('Private Method in %s', true), $controller); ?></h2>
|
||||
<h2><?php printf(__('Private Method in %s'), $controller); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php printf(__('%s%s cannot be accessed directly.', true), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('%s%s cannot be accessed directly.'), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>'); ?>
|
||||
</p>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'private_action.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'private_action.ctp'); ?>
|
||||
</p>
|
|
@ -17,14 +17,14 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Scaffold Error'); ?></h2>
|
||||
<h2><?php echo __('Scaffold Error'); ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php __('Error'); ?>: </strong>
|
||||
<?php __('Method _scaffoldError in was not found in the controller'); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php echo __('Method _scaffoldError in was not found in the controller'); ?>
|
||||
</p>
|
||||
<p class="notice">
|
||||
<strong><?php __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'scaffold_error.ctp'); ?>
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'scaffold_error.ctp'); ?>
|
||||
</p>
|
||||
<pre>
|
||||
<?php
|
||||
|
|
|
@ -151,7 +151,7 @@ class Helper {
|
|||
*
|
||||
*/
|
||||
public function __call($method, $params) {
|
||||
trigger_error(sprintf(__('Method %1$s::%2$s does not exist', true), get_class($this), $method), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('Method %1$s::%2$s does not exist'), get_class($this), $method), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -358,7 +358,7 @@ class FormHelper extends AppHelper {
|
|||
$submitOptions = $options;
|
||||
|
||||
if (!$submit) {
|
||||
$submit = __('Submit', true);
|
||||
$submit = __('Submit');
|
||||
}
|
||||
}
|
||||
$out .= $this->submit($submit, $submitOptions);
|
||||
|
@ -499,7 +499,7 @@ class FormHelper extends AppHelper {
|
|||
if ($text != null) {
|
||||
$error = $text;
|
||||
} elseif (is_numeric($error)) {
|
||||
$error = sprintf(__('Error in field %s', true), Inflector::humanize($this->field()));
|
||||
$error = sprintf(__('Error in field %s'), Inflector::humanize($this->field()));
|
||||
}
|
||||
if ($options['escape']) {
|
||||
$error = h($error);
|
||||
|
@ -542,7 +542,7 @@ class FormHelper extends AppHelper {
|
|||
if (substr($text, -3) == '_id') {
|
||||
$text = substr($text, 0, strlen($text) - 3);
|
||||
}
|
||||
$text = __(Inflector::humanize(Inflector::underscore($text)), true);
|
||||
$text = __(Inflector::humanize(Inflector::underscore($text)));
|
||||
}
|
||||
|
||||
if (is_string($options)) {
|
||||
|
@ -608,16 +608,16 @@ class FormHelper extends AppHelper {
|
|||
}
|
||||
|
||||
if ($legend === true) {
|
||||
$actionName = __('New %s', true);
|
||||
$actionName = __('New %s');
|
||||
$isEdit = (
|
||||
strpos($this->action, 'update') !== false ||
|
||||
strpos($this->action, 'edit') !== false
|
||||
);
|
||||
if ($isEdit) {
|
||||
$actionName = __('Edit %s', true);
|
||||
$actionName = __('Edit %s');
|
||||
}
|
||||
$modelName = Inflector::humanize(Inflector::underscore($model));
|
||||
$legend = sprintf($actionName, __($modelName, true));
|
||||
$legend = sprintf($actionName, __($modelName));
|
||||
}
|
||||
|
||||
$out = null;
|
||||
|
@ -1034,7 +1034,7 @@ class FormHelper extends AppHelper {
|
|||
$legend = $attributes['legend'];
|
||||
unset($attributes['legend']);
|
||||
} elseif (count($options) > 1) {
|
||||
$legend = __(Inflector::humanize($this->field()), true);
|
||||
$legend = __(Inflector::humanize($this->field()));
|
||||
}
|
||||
$label = true;
|
||||
|
||||
|
@ -1284,7 +1284,7 @@ class FormHelper extends AppHelper {
|
|||
*/
|
||||
public function submit($caption = null, $options = array()) {
|
||||
if (!$caption) {
|
||||
$caption = __('Submit', true);
|
||||
$caption = __('Submit');
|
||||
}
|
||||
$out = null;
|
||||
$div = true;
|
||||
|
@ -2090,18 +2090,18 @@ class FormHelper extends AppHelper {
|
|||
break;
|
||||
case 'month':
|
||||
if ($options['monthNames'] === true) {
|
||||
$data['01'] = __('January', true);
|
||||
$data['02'] = __('February', true);
|
||||
$data['03'] = __('March', true);
|
||||
$data['04'] = __('April', true);
|
||||
$data['05'] = __('May', true);
|
||||
$data['06'] = __('June', true);
|
||||
$data['07'] = __('July', true);
|
||||
$data['08'] = __('August', true);
|
||||
$data['09'] = __('September', true);
|
||||
$data['10'] = __('October', true);
|
||||
$data['11'] = __('November', true);
|
||||
$data['12'] = __('December', true);
|
||||
$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 {
|
||||
|
|
|
@ -149,7 +149,7 @@ class JsHelper extends AppHelper {
|
|||
if (method_exists($this, $method . '_')) {
|
||||
return $this->dispatchMethod($method . '_', $params);
|
||||
}
|
||||
trigger_error(sprintf(__('JsHelper:: Missing Method %s is undefined', true), $method), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('JsHelper:: Missing Method %s is undefined'), $method), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -751,7 +751,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return object instance of $this. Allows chained methods.
|
||||
*/
|
||||
public function get($selector) {
|
||||
trigger_error(sprintf(__('%s does not have get() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have get() implemented'), get_class($this)), E_USER_WARNING);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -769,7 +769,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return string completed event handler
|
||||
*/
|
||||
public function event($type, $callback, $options = array()) {
|
||||
trigger_error(sprintf(__('%s does not have event() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have event() implemented'), get_class($this)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -779,7 +779,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return string completed domReady method
|
||||
*/
|
||||
public function domReady($functionBody) {
|
||||
trigger_error(sprintf(__('%s does not have domReady() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have domReady() implemented'), get_class($this)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -789,7 +789,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return string completed iteration
|
||||
*/
|
||||
function each($callback) {
|
||||
trigger_error(sprintf(__('%s does not have each() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have each() implemented'), get_class($this)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -816,7 +816,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return string completed string with effect.
|
||||
*/
|
||||
public function effect($name, $options) {
|
||||
trigger_error(sprintf(__('%s does not have effect() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have effect() implemented'), get_class($this)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -845,7 +845,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return string XHR request.
|
||||
*/
|
||||
public function request($url, $options = array()) {
|
||||
trigger_error(sprintf(__('%s does not have request() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have request() implemented'), get_class($this)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -868,7 +868,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return string Completed drag script
|
||||
*/
|
||||
public function drag($options = array()) {
|
||||
trigger_error(sprintf(__('%s does not have drag() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have drag() implemented'), get_class($this)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -889,7 +889,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return string Completed drop script
|
||||
*/
|
||||
public function drop($options = array()) {
|
||||
trigger_error(sprintf(__('%s does not have drop() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have drop() implemented'), get_class($this)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -914,7 +914,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return string Completed sortable script.
|
||||
*/
|
||||
public function sortable() {
|
||||
trigger_error(sprintf(__('%s does not have sortable() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have sortable() implemented'), get_class($this)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -938,7 +938,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
* @return string Completed slider script
|
||||
*/
|
||||
public function slider() {
|
||||
trigger_error(sprintf(__('%s does not have slider() implemented', true), get_class($this)), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not have slider() implemented'), get_class($this)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -957,7 +957,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
*/
|
||||
public function serializeForm() {
|
||||
trigger_error(
|
||||
sprintf(__('%s does not have serializeForm() implemented', true), get_class($this)), E_USER_WARNING
|
||||
sprintf(__('%s does not have serializeForm() implemented'), get_class($this)), E_USER_WARNING
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper {
|
|||
function drop($options = array()) {
|
||||
if (empty($options['drag'])) {
|
||||
trigger_error(
|
||||
__('MootoolsEngine::drop() requires a "drag" option to properly function', true), E_USER_WARNING
|
||||
__('MootoolsEngine::drop() requires a "drag" option to properly function'), E_USER_WARNING
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -88,15 +88,15 @@ class NumberHelper extends AppHelper {
|
|||
public function toReadableSize($size) {
|
||||
switch (true) {
|
||||
case $size < 1024:
|
||||
return sprintf(__n('%d Byte', '%d Bytes', $size, true), $size);
|
||||
return sprintf(__n('%d Byte', '%d Bytes', $size), $size);
|
||||
case round($size / 1024) < 1024:
|
||||
return sprintf(__('%d KB', true), $this->precision($size / 1024, 0));
|
||||
return sprintf(__('%d KB'), $this->precision($size / 1024, 0));
|
||||
case round($size / 1024 / 1024, 2) < 1024:
|
||||
return sprintf(__('%.2f MB', true), $this->precision($size / 1024 / 1024, 2));
|
||||
return sprintf(__('%.2f MB'), $this->precision($size / 1024 / 1024, 2));
|
||||
case round($size / 1024 / 1024 / 1024, 2) < 1024:
|
||||
return sprintf(__('%.2f GB', true), $this->precision($size / 1024 / 1024 / 1024, 2));
|
||||
return sprintf(__('%.2f GB'), $this->precision($size / 1024 / 1024 / 1024, 2));
|
||||
default:
|
||||
return sprintf(__('%.2f TB', true), $this->precision($size / 1024 / 1024 / 1024 / 1024, 2));
|
||||
return sprintf(__('%.2f TB'), $this->precision($size / 1024 / 1024 / 1024 / 1024, 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ class PaginatorHelper extends AppHelper {
|
|||
App::import('Helper', $ajaxProvider);
|
||||
$classname = $ajaxProvider . 'Helper';
|
||||
if (!is_callable(array($classname, 'link'))) {
|
||||
trigger_error(sprintf(__('%s does not implement a link() method, it is incompatible with PaginatorHelper', true), $classname), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('%s does not implement a link() method, it is incompatible with PaginatorHelper'), $classname), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -295,7 +295,7 @@ class PaginatorHelper extends AppHelper {
|
|||
|
||||
if (empty($key)) {
|
||||
$key = $title;
|
||||
$title = __(Inflector::humanize(preg_replace('/_id$/', '', $title)), true);
|
||||
$title = __(Inflector::humanize(preg_replace('/_id$/', '', $title)));
|
||||
}
|
||||
$dir = isset($options['direction']) ? $options['direction'] : 'asc';
|
||||
unset($options['direction']);
|
||||
|
@ -515,7 +515,7 @@ class PaginatorHelper extends AppHelper {
|
|||
array(
|
||||
'model' => $this->defaultModel(),
|
||||
'format' => 'pages',
|
||||
'separator' => __(' of ', true)
|
||||
'separator' => __(' of ')
|
||||
),
|
||||
$options);
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ class SessionHelper extends CakeSession {
|
|||
* @return boolean
|
||||
*/
|
||||
public function write() {
|
||||
trigger_error(__('You can not write to a Session from the view', true), E_USER_WARNING);
|
||||
trigger_error(__('You can not write to a Session from the view'), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -57,19 +57,19 @@ class TimeHelper extends AppHelper {
|
|||
function __translateSpecifier($specifier) {
|
||||
switch ($specifier[1]) {
|
||||
case 'a':
|
||||
$abday = __c('abday', 5, true);
|
||||
$abday = __c('abday', 5);
|
||||
if (is_array($abday)) {
|
||||
return $abday[date('w', $this->__time)];
|
||||
}
|
||||
break;
|
||||
case 'A':
|
||||
$day = __c('day',5,true);
|
||||
$day = __c('day', 5);
|
||||
if (is_array($day)) {
|
||||
return $day[date('w', $this->__time)];
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
$format = __c('d_t_fmt',5,true);
|
||||
$format = __c('d_t_fmt', 5);
|
||||
if ($format != 'd_t_fmt') {
|
||||
return $this->convertSpecifiers($format, $this->__time);
|
||||
}
|
||||
|
@ -82,13 +82,13 @@ class TimeHelper extends AppHelper {
|
|||
return date('jS', $this->__time);
|
||||
case 'b':
|
||||
case 'h':
|
||||
$months = __c('abmon', 5, true);
|
||||
$months = __c('abmon', 5);
|
||||
if (is_array($months)) {
|
||||
return $months[date('n', $this->__time) -1];
|
||||
}
|
||||
return '%b';
|
||||
case 'B':
|
||||
$months = __c('mon',5,true);
|
||||
$months = __c('mon', 5);
|
||||
if (is_array($months)) {
|
||||
return $months[date('n', $this->__time) -1];
|
||||
}
|
||||
|
@ -99,14 +99,14 @@ class TimeHelper extends AppHelper {
|
|||
case 'P':
|
||||
$default = array('am' => 0, 'pm' => 1);
|
||||
$meridiem = $default[date('a',$this->__time)];
|
||||
$format = __c('am_pm', 5, true);
|
||||
$format = __c('am_pm', 5);
|
||||
if (is_array($format)) {
|
||||
$meridiem = $format[$meridiem];
|
||||
return ($specifier[1] == 'P') ? strtolower($meridiem) : strtoupper($meridiem);
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
$complete = __c('t_fmt_ampm', 5, true);
|
||||
$complete = __c('t_fmt_ampm', 5);
|
||||
if ($complete != 't_fmt_ampm') {
|
||||
return str_replace('%p',$this->__translateSpecifier(array('%p', 'p')),$complete);
|
||||
}
|
||||
|
@ -120,13 +120,13 @@ class TimeHelper extends AppHelper {
|
|||
case 'u':
|
||||
return ($weekDay = date('w', $this->__time)) ? $weekDay : 7;
|
||||
case 'x':
|
||||
$format = __c('d_fmt', 5, true);
|
||||
$format = __c('d_fmt', 5);
|
||||
if ($format != 'd_fmt') {
|
||||
return $this->convertSpecifiers($format, $this->__time);
|
||||
}
|
||||
break;
|
||||
case 'X':
|
||||
$format = __c('t_fmt',5,true);
|
||||
$format = __c('t_fmt', 5);
|
||||
if ($format != 't_fmt') {
|
||||
return $this->convertSpecifiers($format, $this->__time);
|
||||
}
|
||||
|
@ -224,9 +224,9 @@ class TimeHelper extends AppHelper {
|
|||
$y = $this->isThisYear($date) ? '' : ' %Y';
|
||||
|
||||
if ($this->isToday($date)) {
|
||||
$ret = sprintf(__('Today, %s',true), strftime("%H:%M", $date));
|
||||
$ret = sprintf(__('Today, %s'), strftime("%H:%M", $date));
|
||||
} elseif ($this->wasYesterday($date)) {
|
||||
$ret = sprintf(__('Yesterday, %s',true), strftime("%H:%M", $date));
|
||||
$ret = sprintf(__('Yesterday, %s'), strftime("%H:%M", $date));
|
||||
} else {
|
||||
$format = $this->convertSpecifiers("%b %eS{$y}, %H:%M", $date);
|
||||
$ret = strftime($format, $date);
|
||||
|
@ -572,41 +572,41 @@ class TimeHelper extends AppHelper {
|
|||
$diff = $futureTime - $pastTime;
|
||||
|
||||
if ($diff > abs($now - $this->fromString($end))) {
|
||||
$relativeDate = sprintf(__('on %s',true), date($format, $inSeconds));
|
||||
$relativeDate = sprintf(__('on %s'), date($format, $inSeconds));
|
||||
} else {
|
||||
if ($years > 0) {
|
||||
// years and months and days
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $years . ' ' . __n('year', 'years', $years, true);
|
||||
$relativeDate .= $months > 0 ? ($relativeDate ? ', ' : '') . $months . ' ' . __n('month', 'months', $months, true) : '';
|
||||
$relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks, true) : '';
|
||||
$relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days, true) : '';
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $years . ' ' . __n('year', 'years', $years);
|
||||
$relativeDate .= $months > 0 ? ($relativeDate ? ', ' : '') . $months . ' ' . __n('month', 'months', $months) : '';
|
||||
$relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks) : '';
|
||||
$relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days) : '';
|
||||
} elseif (abs($months) > 0) {
|
||||
// months, weeks and days
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $months . ' ' . __n('month', 'months', $months, true);
|
||||
$relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks, true) : '';
|
||||
$relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days, true) : '';
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $months . ' ' . __n('month', 'months', $months);
|
||||
$relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks) : '';
|
||||
$relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days) : '';
|
||||
} elseif (abs($weeks) > 0) {
|
||||
// weeks and days
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks, true);
|
||||
$relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days, true) : '';
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks);
|
||||
$relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days) : '';
|
||||
} elseif (abs($days) > 0) {
|
||||
// days and hours
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days, true);
|
||||
$relativeDate .= $hours > 0 ? ($relativeDate ? ', ' : '') . $hours . ' ' . __n('hour', 'hours', $hours, true) : '';
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days);
|
||||
$relativeDate .= $hours > 0 ? ($relativeDate ? ', ' : '') . $hours . ' ' . __n('hour', 'hours', $hours) : '';
|
||||
} elseif (abs($hours) > 0) {
|
||||
// hours and minutes
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $hours . ' ' . __n('hour', 'hours', $hours, true);
|
||||
$relativeDate .= $minutes > 0 ? ($relativeDate ? ', ' : '') . $minutes . ' ' . __n('minute', 'minutes', $minutes, true) : '';
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $hours . ' ' . __n('hour', 'hours', $hours);
|
||||
$relativeDate .= $minutes > 0 ? ($relativeDate ? ', ' : '') . $minutes . ' ' . __n('minute', 'minutes', $minutes) : '';
|
||||
} elseif (abs($minutes) > 0) {
|
||||
// minutes only
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $minutes . ' ' . __n('minute', 'minutes', $minutes, true);
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $minutes . ' ' . __n('minute', 'minutes', $minutes);
|
||||
} else {
|
||||
// seconds only
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $seconds . ' ' . __n('second', 'seconds', $seconds, true);
|
||||
$relativeDate .= ($relativeDate ? ', ' : '') . $seconds . ' ' . __n('second', 'seconds', $seconds);
|
||||
}
|
||||
|
||||
if (!$backwards) {
|
||||
$relativeDate = sprintf(__('%s ago', true), $relativeDate);
|
||||
$relativeDate = sprintf(__('%s ago'), $relativeDate);
|
||||
}
|
||||
}
|
||||
return $relativeDate;
|
||||
|
@ -642,7 +642,7 @@ class TimeHelper extends AppHelper {
|
|||
public function wasWithinLast($timeInterval, $dateString, $userOffset = null) {
|
||||
$tmp = str_replace(' ', '', $timeInterval);
|
||||
if (is_numeric($tmp)) {
|
||||
$timeInterval = $tmp . ' ' . __('days', true);
|
||||
$timeInterval = $tmp . ' ' . __('days');
|
||||
}
|
||||
|
||||
$date = $this->fromString($dateString, $userOffset);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<head>
|
||||
<?php echo $this->Html->charset(); ?>
|
||||
<title>
|
||||
<?php __('CakePHP: the rapid development php framework:'); ?>
|
||||
<?php echo __('CakePHP: the rapid development php framework:'); ?>
|
||||
<?php echo $title_for_layout; ?>
|
||||
</title>
|
||||
<?php
|
||||
|
@ -47,7 +47,7 @@
|
|||
</div>
|
||||
<div id="footer">
|
||||
<?php echo $this->Html->link(
|
||||
$this->Html->image('cake.power.gif', array('alt'=> __('CakePHP: the rapid development php framework', true), 'border' => '0')),
|
||||
$this->Html->image('cake.power.gif', array('alt'=> __('CakePHP: the rapid development php framework'), 'border' => '0')),
|
||||
'http://www.cakephp.org/',
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
|
|
|
@ -20,8 +20,8 @@ if (Configure::read() == 0):
|
|||
$this->cakeError('error404');
|
||||
endif;
|
||||
?>
|
||||
<h2><?php echo sprintf(__('Release Notes for CakePHP %s.', true), Configure::version()); ?></h2>
|
||||
<a href="http://cakephp.lighthouseapp.com/projects/42648/changelog-1-3-0-RC3"><?php __('Read the changelog'); ?> </a>
|
||||
<h2><?php echo sprintf(__('Release Notes for CakePHP %s.'), Configure::version()); ?></h2>
|
||||
<a href="http://cakephp.lighthouseapp.com/projects/42648/changelog-1-3-0-RC3"><?php echo __('Read the changelog'); ?> </a>
|
||||
<?php
|
||||
if (Configure::read() > 0):
|
||||
Debugger::checkSecurityKeys();
|
||||
|
@ -31,11 +31,11 @@ endif;
|
|||
<?php
|
||||
if (is_writable(TMP)):
|
||||
echo '<span class="notice success">';
|
||||
__('Your tmp directory is writable.');
|
||||
echo __('Your tmp directory is writable.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
__('Your tmp directory is NOT writable.');
|
||||
echo __('Your tmp directory is NOT writable.');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
|
@ -45,11 +45,11 @@ endif;
|
|||
$settings = Cache::settings();
|
||||
if (!empty($settings)):
|
||||
echo '<span class="notice success">';
|
||||
printf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. $settings['engine'] . 'Engine</em>');
|
||||
printf(__('The %s is being used for caching. To change the config edit APP/config/core.php '), '<em>'. $settings['engine'] . 'Engine</em>');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
__('Your cache is NOT working. Please check the settings in APP/config/core.php');
|
||||
echo __('Your cache is NOT working. Please check the settings in APP/config/core.php');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
|
@ -59,14 +59,14 @@ endif;
|
|||
$filePresent = null;
|
||||
if (file_exists(CONFIGS.'database.php')):
|
||||
echo '<span class="notice success">';
|
||||
__('Your database configuration file is present.');
|
||||
echo __('Your database configuration file is present.');
|
||||
$filePresent = true;
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
__('Your database configuration file is NOT present.');
|
||||
echo __('Your database configuration file is NOT present.');
|
||||
echo '<br/>';
|
||||
__('Rename config/database.php.default to config/database.php');
|
||||
echo __('Rename config/database.php.default to config/database.php');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
|
@ -83,30 +83,30 @@ if (isset($filePresent)):
|
|||
<?php
|
||||
if ($connected->isConnected()):
|
||||
echo '<span class="notice success">';
|
||||
__('Cake is able to connect to the database.');
|
||||
echo __('Cake is able to connect to the database.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
__('Cake is NOT able to connect to the database.');
|
||||
echo __('Cake is NOT able to connect to the database.');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
<?php endif;?>
|
||||
<h3><?php __('Editing this Page'); ?></h3>
|
||||
<h3><?php echo __('Editing this Page'); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
__('To change the content of this page, create: APP/views/pages/home.ctp.<br />
|
||||
echo __('To change the content of this page, create: APP/views/pages/home.ctp.<br />
|
||||
To change its layout, create: APP/views/layouts/default.ctp.<br />
|
||||
You can also add some CSS styles for your pages at: APP/webroot/css.');
|
||||
?>
|
||||
</p>
|
||||
|
||||
<h3><?php __('Getting Started'); ?></h3>
|
||||
<h3><?php echo __('Getting Started'); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Html->link(
|
||||
sprintf('<strong>%s</strong>%s', __('new', true ), __('CakePHP 1.2 Docs', true )),
|
||||
sprintf('<strong>%s</strong>%s', __('new'), __('CakePHP 1.2 Docs')),
|
||||
'http://book.cakephp.org',
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
|
@ -115,46 +115,46 @@ You can also add some CSS styles for your pages at: APP/webroot/css.');
|
|||
<p>
|
||||
<?php
|
||||
echo $this->Html->link(
|
||||
__('The 15 min Blog Tutorial', true),
|
||||
__('The 15 min Blog Tutorial'),
|
||||
'http://book.cakephp.org/view/219/the-cakephp-blog-tutorial',
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<h3><?php __('More about Cake'); ?></h3>
|
||||
<h3><?php echo __('More about Cake'); ?></h3>
|
||||
<p>
|
||||
<?php __('CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.'); ?>
|
||||
<?php echo __('CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php __('Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.'); ?>
|
||||
<?php echo __('Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://cakefoundation.org/"><?php __('Cake Software Foundation'); ?> </a>
|
||||
<ul><li><?php __('Promoting development related to CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://www.cakephp.org"><?php __('CakePHP'); ?> </a>
|
||||
<ul><li><?php __('The Rapid Development Framework'); ?></li></ul></li>
|
||||
<li><a href="http://book.cakephp.org"><?php __('CakePHP Documentation'); ?> </a>
|
||||
<ul><li><?php __('Your Rapid Development Cookbook'); ?></li></ul></li>
|
||||
<li><a href="http://api.cakephp.org"><?php __('CakePHP API'); ?> </a>
|
||||
<ul><li><?php __('Quick Reference'); ?></li></ul></li>
|
||||
<li><a href="http://bakery.cakephp.org"><?php __('The Bakery'); ?> </a>
|
||||
<ul><li><?php __('Everything CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://live.cakephp.org"><?php __('The Show'); ?> </a>
|
||||
<ul><li><?php __('The Show is a live and archived internet radio broadcast CakePHP-related topics and answer questions live via IRC, Skype, and telephone.'); ?></li></ul></li>
|
||||
<li><a href="http://groups.google.com/group/cake-php"><?php __('CakePHP Google Group'); ?> </a>
|
||||
<ul><li><?php __('Community mailing list'); ?></li></ul></li>
|
||||
<li><a href="http://cakefoundation.org/"><?php echo __('Cake Software Foundation'); ?> </a>
|
||||
<ul><li><?php echo __('Promoting development related to CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://www.cakephp.org"><?php echo __('CakePHP'); ?> </a>
|
||||
<ul><li><?php echo __('The Rapid Development Framework'); ?></li></ul></li>
|
||||
<li><a href="http://book.cakephp.org"><?php echo __('CakePHP Documentation'); ?> </a>
|
||||
<ul><li><?php echo __('Your Rapid Development Cookbook'); ?></li></ul></li>
|
||||
<li><a href="http://api.cakephp.org"><?php echo __('CakePHP API'); ?> </a>
|
||||
<ul><li><?php echo __('Quick Reference'); ?></li></ul></li>
|
||||
<li><a href="http://bakery.cakephp.org"><?php echo __('The Bakery'); ?> </a>
|
||||
<ul><li><?php echo __('Everything CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://live.cakephp.org"><?php echo __('The Show'); ?> </a>
|
||||
<ul><li><?php echo __('The Show is a live and archived internet radio broadcast CakePHP-related topics and answer questions live via IRC, Skype, and telephone.'); ?></li></ul></li>
|
||||
<li><a href="http://groups.google.com/group/cake-php"><?php echo __('CakePHP Google Group'); ?> </a>
|
||||
<ul><li><?php echo __('Community mailing list'); ?></li></ul></li>
|
||||
<li><a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a>
|
||||
<ul><li><?php __('Live chat about CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://github.com/cakephp/"><?php __('CakePHP Code'); ?> </a>
|
||||
<ul><li><?php __('For the Development of CakePHP Git repository, Downloads'); ?></li></ul></li>
|
||||
<li><a href="http://cakephp.lighthouseapp.com/"><?php __('CakePHP Lighthouse'); ?> </a>
|
||||
<ul><li><?php __('CakePHP Tickets, Wiki pages, Roadmap'); ?></li></ul></li>
|
||||
<li><a href="http://www.cakeforge.org"><?php __('CakeForge'); ?> </a>
|
||||
<ul><li><?php __('Open Development for CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://astore.amazon.com/cakesoftwaref-20/"><?php __('Book Store'); ?> </a>
|
||||
<ul><li><?php __('Recommended Software Books'); ?></li></ul></li>
|
||||
<li><a href="http://www.cafepress.com/cakefoundation"><?php __('CakePHP gear'); ?> </a>
|
||||
<ul><li><?php __('Get your own CakePHP gear - Doughnate to Cake'); ?></li></ul></li>
|
||||
<ul><li><?php echo __('Live chat about CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://github.com/cakephp/"><?php echo __('CakePHP Code'); ?> </a>
|
||||
<ul><li><?php echo __('For the Development of CakePHP Git repository, Downloads'); ?></li></ul></li>
|
||||
<li><a href="http://cakephp.lighthouseapp.com/"><?php echo __('CakePHP Lighthouse'); ?> </a>
|
||||
<ul><li><?php echo __('CakePHP Tickets, Wiki pages, Roadmap'); ?></li></ul></li>
|
||||
<li><a href="http://www.cakeforge.org"><?php echo __('CakeForge'); ?> </a>
|
||||
<ul><li><?php echo __('Open Development for CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://astore.amazon.com/cakesoftwaref-20/"><?php echo __('Book Store'); ?> </a>
|
||||
<ul><li><?php echo __('Recommended Software Books'); ?></li></ul></li>
|
||||
<li><a href="http://www.cafepress.com/cakefoundation"><?php echo __('CakePHP gear'); ?> </a>
|
||||
<ul><li><?php echo __('Get your own CakePHP gear - Doughnate to Cake'); ?></li></ul></li>
|
||||
</ul>
|
|
@ -21,23 +21,23 @@
|
|||
<?php
|
||||
echo $this->Form->create();
|
||||
echo $this->Form->inputs($scaffoldFields, array('created', 'modified', 'updated'));
|
||||
echo $this->Form->end(__('Submit', true));
|
||||
echo $this->Form->end(__('Submit'));
|
||||
?>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<h3><?php __('Actions'); ?></h3>
|
||||
<h3><?php echo __('Actions'); ?></h3>
|
||||
<ul>
|
||||
<?php if ($this->action != 'add'):?>
|
||||
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value($modelClass.'.'.$primaryKey)), null, __('Are you sure you want to delete', true).' #' . $this->Form->value($modelClass.'.'.$primaryKey)); ?></li>
|
||||
<li><?php echo $this->Html->link(__('Delete'), array('action' => 'delete', $this->Form->value($modelClass.'.'.$primaryKey)), null, __('Are you sure you want to delete').' #' . $this->Form->value($modelClass.'.'.$primaryKey)); ?></li>
|
||||
<?php endif;?>
|
||||
<li><?php echo $this->Html->link(__('List', true).' '.$pluralHumanName, array('action' => 'index'));?></li>
|
||||
<li><?php echo $this->Html->link(__('List').' '.$pluralHumanName, array('action' => 'index'));?></li>
|
||||
<?php
|
||||
$done = array();
|
||||
foreach ($associations as $_type => $_data) {
|
||||
foreach ($_data as $_alias => $_details) {
|
||||
if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' =>'index')) . "</li>\n";
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' =>'add')) . "</li>\n";
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('List %s'), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' =>'index')) . "</li>\n";
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('New %s'), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' =>'add')) . "</li>\n";
|
||||
$done[] = $_details['controller'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<?php foreach ($scaffoldFields as $_field):?>
|
||||
<th><?php echo $this->Paginator->sort($_field);?></th>
|
||||
<?php endforeach;?>
|
||||
<th><?php __('Actions');?></th>
|
||||
<th><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$i = 0;
|
||||
|
@ -52,9 +52,9 @@ echo "\n";
|
|||
}
|
||||
|
||||
echo "\t\t<td class=\"actions\">\n";
|
||||
echo "\t\t\t" . $this->Html->link(__('View', true), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey])) . "\n";
|
||||
echo "\t\t\t" . $this->Html->link(__('Edit', true), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])) . "\n";
|
||||
echo "\t\t\t" . $this->Html->link(__('Delete', true), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __('Are you sure you want to delete', true).' #' . ${$singularVar}[$modelClass][$primaryKey]) . "\n";
|
||||
echo "\t\t\t" . $this->Html->link(__('View'), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey])) . "\n";
|
||||
echo "\t\t\t" . $this->Html->link(__('Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])) . "\n";
|
||||
echo "\t\t\t" . $this->Html->link(__('Delete'), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __('Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey]) . "\n";
|
||||
echo "\t\t</td>\n";
|
||||
echo "\t</tr>\n";
|
||||
|
||||
|
@ -64,26 +64,26 @@ echo "\n";
|
|||
</table>
|
||||
<p><?php
|
||||
echo $this->Paginator->counter(array(
|
||||
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%')
|
||||
));
|
||||
?></p>
|
||||
<div class="paging">
|
||||
<?php echo "\t" . $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class' => 'disabled')) . "\n";?>
|
||||
<?php echo "\t" . $this->Paginator->prev('<< ' . __('previous'), array(), null, array('class' => 'disabled')) . "\n";?>
|
||||
| <?php echo $this->Paginator->numbers() . "\n"?>
|
||||
<?php echo "\t ". $this->Paginator->next(__('next', true) .' >>', array(), null, array('class' => 'disabled')) . "\n";?>
|
||||
<?php echo "\t ". $this->Paginator->next(__('next') .' >>', array(), null, array('class' => 'disabled')) . "\n";?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<h3><?php __('Actions'); ?></h3>
|
||||
<h3><?php echo __('Actions'); ?></h3>
|
||||
<ul>
|
||||
<li><?php echo $this->Html->link(sprintf(__('New %s', true), $singularHumanName), array('action' => 'add')); ?></li>
|
||||
<li><?php echo $this->Html->link(sprintf(__('New %s'), $singularHumanName), array('action' => 'add')); ?></li>
|
||||
<?php
|
||||
$done = array();
|
||||
foreach ($associations as $_type => $_data) {
|
||||
foreach ($_data as $_alias => $_details) {
|
||||
if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>\n";
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>\n";
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('List %s'), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>\n";
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('New %s'), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>\n";
|
||||
$done[] = $_details['controller'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
?>
|
||||
<div class="<?php echo $pluralVar;?> view">
|
||||
<h2><?php printf(__("View %s", true), $singularHumanName); ?></h2>
|
||||
<h2><?php printf(__('View %s'), $singularHumanName); ?></h2>
|
||||
<dl>
|
||||
<?php
|
||||
$i = 0;
|
||||
|
@ -47,20 +47,20 @@ foreach ($scaffoldFields as $_field) {
|
|||
</dl>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<h3><?php __('Actions'); ?></h3>
|
||||
<h3><?php echo __('Actions'); ?></h3>
|
||||
<ul>
|
||||
<?php
|
||||
echo "\t\t<li>" .$this->Html->link(sprintf(__('Edit %s', true), $singularHumanName), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])). " </li>\n";
|
||||
echo "\t\t<li>" .$this->Html->link(sprintf(__('Delete %s', true), $singularHumanName), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __('Are you sure you want to delete', true).' #' . ${$singularVar}[$modelClass][$primaryKey] . '?'). " </li>\n";
|
||||
echo "\t\t<li>" .$this->Html->link(sprintf(__('List %s', true), $pluralHumanName), array('action' => 'index')). " </li>\n";
|
||||
echo "\t\t<li>" .$this->Html->link(sprintf(__('New %s', true), $singularHumanName), array('action' => 'add')). " </li>\n";
|
||||
echo "\t\t<li>" .$this->Html->link(sprintf(__('Edit %s'), $singularHumanName), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])). " </li>\n";
|
||||
echo "\t\t<li>" .$this->Html->link(sprintf(__('Delete %s'), $singularHumanName), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __('Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey] . '?'). " </li>\n";
|
||||
echo "\t\t<li>" .$this->Html->link(sprintf(__('List %s'), $pluralHumanName), array('action' => 'index')). " </li>\n";
|
||||
echo "\t\t<li>" .$this->Html->link(sprintf(__('New %s'), $singularHumanName), array('action' => 'add')). " </li>\n";
|
||||
|
||||
$done = array();
|
||||
foreach ($associations as $_type => $_data) {
|
||||
foreach ($_data as $_alias => $_details) {
|
||||
if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>\n";
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>\n";
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('List %s'), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>\n";
|
||||
echo "\t\t<li>" . $this->Html->link(sprintf(__('New %s'), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>\n";
|
||||
$done[] = $_details['controller'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@ class View extends Object {
|
|||
$this->hasRendered = true;
|
||||
} else {
|
||||
$out = $this->_render($viewFileName, $this->viewVars);
|
||||
trigger_error(sprintf(__("Error in view %s, got: <blockquote>%s</blockquote>", true), $viewFileName, $out), E_USER_ERROR);
|
||||
trigger_error(sprintf(__("Error in view %s, got: <blockquote>%s</blockquote>"), $viewFileName, $out), E_USER_ERROR);
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
@ -480,7 +480,7 @@ class View extends Object {
|
|||
|
||||
if ($this->output === false) {
|
||||
$this->output = $this->_render($layoutFileName, $data_for_layout);
|
||||
trigger_error(sprintf(__("Error in layout %s, got: <blockquote>%s</blockquote>", true), $layoutFileName, $this->output), E_USER_ERROR);
|
||||
trigger_error(sprintf(__("Error in layout %s, got: <blockquote>%s</blockquote>"), $layoutFileName, $this->output), E_USER_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -396,7 +396,7 @@ class XmlNode extends Object {
|
|||
|
||||
if (is_object($child)) {
|
||||
if ($this->compare($child)) {
|
||||
trigger_error(__('Cannot append a node to itself.', true));
|
||||
trigger_error(__('Cannot append a node to itself.'));
|
||||
$return = false;
|
||||
return $return;
|
||||
}
|
||||
|
@ -890,7 +890,7 @@ class Xml extends XmlNode {
|
|||
} elseif (file_exists($input)) {
|
||||
$this->__rawData = file_get_contents($input);
|
||||
} else {
|
||||
trigger_error(__('XML cannot be read', true));
|
||||
trigger_error(__('XML cannot be read'));
|
||||
return false;
|
||||
}
|
||||
return $this->parse();
|
||||
|
|
Loading…
Add table
Reference in a new issue