60daef0a03468123ff2bea5a34cf8fd78fdecfe0

Author: chawbacca

Date: 2009-01-27 23:59:26 -0600

Merge from cakebook.git

diff --git a/.gitignore b/.gitignore index e69de29..c338d12 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,7 @@ +errors.err +*.swp +*.swo +*~ +config/core.php +config/database.php +tmp/* \ No newline at end of file diff --git a/app_controller.php b/app_controller.php index 1da7543..718389a 100644 --- a/app_controller.php +++ b/app_controller.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: app_controller.php 697 2008-11-10 20:50:32Z AD7six $ */ /** * Short description for file. * @@ -22,9 +21,6 @@ * @package cake * @subpackage cake.app * @since CakePHP v 0.2.9 - * @version $Revision: 697 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-10 21:50:32 +0100 (Mon, 10 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -85,30 +81,27 @@ class AppController extends Controller { } elseif (!$sessionReferer) { $this->Session->write('referer', $this->referer(array('action' => 'index'))); } - - $this->params['lang'] = isset($this->params['lang'])?$this->params['lang']: - (isset($this->params['named']['lang'])?$this->params['named']['lang']:'en'); + $defaultLang = Configure::read('Languages.default'); + $this->params['theme'] = isset($this->params['theme'])?$this->params['theme']:'default'; + $this->params['lang'] = isset($this->params['lang'])?$this->params['lang']:$defaultLang; Configure::write('Config.language', $this->params['lang']); if (($this->name != 'App') && !in_array($this->params['lang'], Configure::read('Languages.all'))) { $this->Session->setFlash(__('Whoops, not a valid language.', true)); return $this->redirect($this->Session->read('referer'), 301, true); } - - if (!isset($this->params['requested']) && strpos($this->params['url']['url'], 'en') === 0) { - return $this->redirect($this->params['pass'], 301, true); - } - - if (!in_array($this->params['lang'], array(null, 'en'))) { - if (isset($this->Node)) { - $this->Node->setLanguage($this->params['lang']); - } elseif (isset($this->{$this->modelClass}->Node)) { - $this->{$this->modelClass}->Node->setLanguage($this->params['lang']); - } + if (isset($this->Node)) { + $this->Node->setLanguage($this->params['lang']); + } elseif (isset($this->{$this->modelClass}->Node)) { + $this->{$this->modelClass}->Node->setLanguage($this->params['lang']); } if (!$this->Auth->user()) { + if(!in_array($this->name, array('Users', 'CakeError')) && !isset($this->params['requested'])) { + $this->Session->write('Auth.redirect', '/' . $this->params['url']['url']); + } $this->Auth->authError = __('Please login to continue', true); } - $this->Auth->loginRedirect = $this->Session->read('referer'); + $this->Auth->loginAction = array('lang' => $this->params['lang'], 'theme' => $this->params['theme'], + 'plugin' => 'users', 'controller' => 'users', 'action' => 'login'); $this->Auth->autoRedirect = false; $this->Auth->allow('display'); $this->{$this->modelClass}->currentUserId = $this->Auth->user('id'); @@ -125,9 +118,13 @@ class AppController extends Controller { } $this->set('modelClass', $this->modelClass); $this->set('isAdmin', isset($this->params['admin'])); + if (!$this->RequestHandler->isAjax()) { + $this->layout = $this->params['theme']; + } if ($this->name == 'App' && Configure::read()) { $this->layout = 'error'; } + $this->set('defaultLang', Configure::read('Languages.default')); } /** * redirect function @@ -139,12 +136,17 @@ class AppController extends Controller { * @return void */ function redirect($url, $code = null, $exit = true) { - if (!isset($this->params['lang'])) { - $this->params['lang'] = 'en'; - } - if (!isset($url['lang']) && !in_array($this->params['lang'], array(null, 'en'))) { - $url['lang'] = $this->params['lang']; + if (!is_array($url)) { + return parent::redirect($url, $code, $exit); } + $defaults = array( + 'controller' => Inflector::underscore($this->name), + 'action' => $this->action, + 'admin' => !empty($this->params['admin']), + 'lang' => $this->params['lang'], + 'theme' => $this->params['theme'], + ); + $url = am($defaults, $url); return parent::redirect($url, $code, $exit); } /** @@ -268,6 +270,8 @@ class AppController extends Controller { } else { $conditions = $this->__conditions; } + unset($conditions[$this->modelClass . '.theme']); + unset($conditions[$this->modelClass . '.language']); $Node = ClassRegistry::init('Node'); $collections = $Node->find('all', array('conditions' => array('Node.parent_id' => 1), 'fields' => 'Node.*, Revision.title')); $books = $Node->find('all', array('conditions' => array('Node.depth' => 2), 'fields' => 'Node.*, Revision.title')); @@ -294,10 +298,17 @@ class AppController extends Controller { $this->admin_index(); $this->render('admin_index'); } - +/** + * appError method + * + * @param string $message + * @return void + * @access public + */ function appError($message = 'x') { if (Configure::read()) { - debug (func_get_args()); die; + debug (func_get_args()); + debug (Router::currentRoute()); die; } $this->Session->setFlash('Whoops! nothing to see there'); $this->redirect('/'); diff --git a/app_helper.php b/app_helper.php index e76234f..def0c68 100755 --- a/app_helper.php +++ b/app_helper.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: app_helper.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -22,9 +21,6 @@ * @package cake * @subpackage cake.cake * @since CakePHP(tm) v 0.2.9 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -39,13 +35,6 @@ */ class AppHelper extends Helper { /** - * name variable - * - * @var string - * @access public - */ - var $name = 'App'; -/** * url function * * @param mixed $url @@ -54,25 +43,28 @@ class AppHelper extends Helper { * @return void */ function url($url = null, $full = false) { - if (is_array($url)) { - if (isset($url['lang'])) { - if ($url['lang'] == 'en') { - unset ($url['lang']); - } - } elseif (!empty($this->params['lang']) && !in_array($this->params['lang'], array(null, 'en'))) { - $url['lang'] = $this->params['lang']; - } - + if (!is_array($url)) { + return parent::url($url, $full); } - $return = Router::url($url, $full); - $id = Configure::read('Site.homeNode'); - if (strpos($return, 'view/' . $id . '/')) { - $return = $this->webroot; - if (isset($url['lang'])) { - $return .= $url['lang'] . '/'; + $defaults = array( + 'controller' => $this->params['controller'], + 'action' => $this->params['action'], + 'admin' => !empty($this->params['admin']), + 'lang' => $this->params['lang'], + 'theme' => $this->params['theme'], + ); + $url = am($defaults, $url); + if (isset($url[0])) { + $id = Configure::read('Site.homeNode'); + if (empty($url['admin']) && $url['controller'] === 'nodes' && $url['action'] === 'view' && $url[0] == $id) { + $url = array( + 'action' => 'index', + 'lang' => $this->params['lang'], + 'theme' => $this->params['theme'] + ); } } - return $return; + return parent::url($url, $full); } } ?> \ No newline at end of file diff --git a/app_model.php b/app_model.php index 630abae..56cef9e 100644 --- a/app_model.php +++ b/app_model.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: app_model.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Application model for Cake. @@ -23,9 +22,6 @@ * @package cake * @subpackage cake.app * @since CakePHP v 0.2.9 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ diff --git a/config/acl.ini.php b/config/acl.ini.php deleted file mode 100644 index e31659e..0000000 --- a/config/acl.ini.php +++ /dev/null @@ -1,76 +0,0 @@ -;<?php die() ?> -; SVN FILE: $Id: acl.ini.php 689 2008-11-05 10:30:07Z AD7six $ -;/** -; * Short description for file. -; * -; * -; * PHP versions 4 and 5 -; * -; * CakePHP : Rapid Development Framework <http://www.cakephp.org/> -; * Copyright (c) 2006, Cake Software Foundation, Inc. -; * 1785 E. Sahara Avenue, Suite 490-204 -; * Las Vegas, Nevada 89104 -; * -; * Licensed under The MIT License -; * Redistributions of files must retain the above copyright notice. -; * -; * @filesource -; * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. -; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project -; * @package cake -; * @subpackage cake.app.config -; * @since CakePHP v 0.10.0.1076 -; * @version $Revision: 689 $ -; * @modifiedby $LastChangedBy: AD7six $ -; * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ -; * @license http://www.opensource.org/licenses/mit-license.php The MIT License -; */ - -; acl.ini.php - Cake ACL Configuration -; --------------------------------------------------------------------- -; Use this file to specify user permissions. -; aco = access control object (something in your application) -; aro = access request object (something requesting access) -; -; User records are added as follows: -; -; [uid] -; groups = group1, group2, group3 -; allow = aco1, aco2, aco3 -; deny = aco4, aco5, aco6 -; -; Group records are added in a similar manner: -; -; [gid] -; allow = aco1, aco2, aco3 -; deny = aco4, aco5, aco6 -; -; The allow, deny, and groups sections are all optional. -; NOTE: groups names *cannot* ever be the same as usernames! -; -; ACL permissions are checked in the following order: -; 1. Check for user denies (and DENY if specified) -; 2. Check for user allows (and ALLOW if specified) -; 3. Gather user's groups -; 4. Check group denies (and DENY if specified) -; 5. Check group allows (and ALLOW if specified) -; 6. If no aro, aco, or group information is found, DENY -; -; --------------------------------------------------------------------- - -;------------------------------------- -;Users -;------------------------------------- - -[username-goes-here] -groups = group1, group2 -deny = aco1, aco2 -allow = aco3, aco4 - -;------------------------------------- -;Groups -;------------------------------------- - -[groupname-goes-here] -deny = aco5, aco6 -allow = aco7, aco8 \ No newline at end of file diff --git a/config/bootstrap.php b/config/bootstrap.php index 3cc8d9f..2178436 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: bootstrap.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -21,9 +20,6 @@ * @package cake * @subpackage cake.app.config * @since CakePHP v 0.10.8.2117 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -52,9 +48,11 @@ Configure::write('Site.email', 'team@cakefoundation.org'); Configure::write('Site.database', 'bakery'); -$langs = array('ar', 'en', 'fa', 'fr', 'de', 'es', 'pt', 'nl', 'id', 'it', 'ja', 'bg', 'hu', 'pl', 'cz', 'cn', 'ko', 'ro'); +Configure::write('Languages.default', 'en'); +$langs = array('ar', 'en', 'fa', 'fr', 'de', 'es', 'pt', 'nl', 'id', 'it', 'ja', 'bg', 'hu', 'pl', 'cz', 'cn', 'ko', 'ro', 'ms', 'tw', 'ru'); sort($langs); Configure::write('Languages.all', $langs); + define('ADMIN', '800'); define('EDITOR', '700'); define('MODERATOR', '600'); diff --git a/config/inflections.php b/config/inflections.php index a42bebc..3a34def 100644 --- a/config/inflections.php +++ b/config/inflections.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: inflections.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Custom Inflected Words. * @@ -22,9 +21,6 @@ * @package cake * @subpackage cake.app.config * @since CakePHP v 1.0.0.2312 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/config/routes.php b/config/routes.php index fdb5daa..577e398 100644 --- a/config/routes.php +++ b/config/routes.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: routes.php 703 2008-11-19 12:13:40Z AD7six $ */ /** * Short description for file. * @@ -11,8 +10,8 @@ * * CakePHP : Rapid Development Framework <http://www.cakephp.org/> * Copyright (c) 2006, Cake Software Foundation, Inc. - * 1785 E. Sahara Avenue, Suite 490-204 - * Las Vegas, Nevada 89104 + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. @@ -23,77 +22,59 @@ * @package cake * @subpackage cake.app.config * @since CakePHP v 0.2.9 - * @version $Revision: 703 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-19 13:13:40 +0100 (Wed, 19 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ -/** - * Here, we are connecting '/' (base path) to controller called 'Pages', - * its action called 'display', and we pass a param to select the view file - * to use (in this case, /app/views/pages/home.thtml)... - */ -if (!empty($fromUrl) && strpos($fromUrl, 'admin') === 0) { - Router::connectNamed(true); -} else { - Router::connectNamed(array('node', 'user', 'language', 'status'), array('default' => true)); +$defaultLang = Configure::read('Languages.default'); +if (!empty($fromUrl)) { + if (strpos($fromUrl, 'admin') === 0) { + Router::connectNamed(true); + } else { + Router::connectNamed(array('node', 'user', 'language', 'status'), array('default' => true)); + } } Router::parseExtensions('rss', 'xml'); - -Router::connect('/', array('controller' => 'nodes', 'action' => 'index'), array('lang' => 'en')); -Router::connect('/:lang/', array('controller' => 'nodes', 'action' => 'index'), array('lang' => '[a-z]{2}')); - -Router::connect('/:lang/stats/*', array('controller' => 'nodes', 'action' => 'stats'), array('lang' => '[a-z]{2}')); -Router::connect('/stats', array('controller' => 'nodes', 'action' => 'stats'), array('lang' => 'en')); - -Router::connect('/:lang/todo/*', array('controller' => 'nodes', 'action' => 'todo'), array('lang' => '[a-z]{2}')); -Router::connect('/todo', array('controller' => 'nodes', 'action' => 'todo'), array('lang' => 'en')); - -Router::connect('/:lang/view/*', array('controller' => 'nodes', 'action' => 'view'), array('lang' => '[a-z]{2}')); -Router::connect('/view/*', array('controller' => 'nodes', 'action' => 'view'), array('lang' => 'en')); - -Router::connect('/search/*', array('controller' => 'revisions', 'action' => 'search'), array('lang' => 'en')); -Router::connect('/:lang/search/*', array('controller' => 'revisions', 'action' => 'search'), array('lang' => '[a-z]{2}')); - -Router::connect('/results/*', array('controller' => 'revisions', 'action' => 'results'), array('lang' => 'en')); -Router::connect('/:lang/results/*', array('controller' => 'revisions', 'action' => 'results'), array('lang' => '[a-z]{2}')); - -Router::connect('/compare/*', array('controller' => 'nodes', 'action' => 'compare'), array('lang' => 'en')); -Router::connect('/:lang/compare/*', array('controller' => 'nodes', 'action' => 'compare'), array('lang' => '[a-z]{2}')); - -Router::connect('/changes/*', array('controller' => 'changes', 'action' => 'index'), array('lang' => 'en')); -Router::connect('/:lang/changes/*', array('controller' => 'changes', 'action' => 'index'), array('lang' => '[a-z]{2}')); - -Router::connect('/history/*', array('controller' => 'nodes', 'action' => 'history'), array('lang' => 'en')); -Router::connect('/:lang/history/*', array('controller' => 'nodes', 'action' => 'history'), array('lang' => '[a-z]{2}')); - -Router::connect('/toc/*', array('controller' => 'nodes', 'action' => 'toc'), array('lang' => 'en')); -Router::connect('/:lang/toc/*', array('controller' => 'nodes', 'action' => 'toc'), array('lang' => '[a-z]{2}')); - -Router::connect('/complete/*', array('controller' => 'nodes', 'action' => 'single_page'), array('lang' => 'en')); -Router::connect('/:lang/complete/*', array('controller' => 'nodes', 'action' => 'single_page'), array('lang' => '[a-z]{2}')); - -Router::connect('/edit/*', array('controller' => 'nodes', 'action' => 'edit'), array('lang' => 'en')); -Router::connect('/:lang/edit/*', array('controller' => 'nodes', 'action' => 'edit'), array('lang' => '[a-z]{2}')); - -Router::connect('/add/*', array('controller' => 'nodes', 'action' => 'add'), array('lang' => 'en')); -Router::connect('/:lang/add/*', array('controller' => 'nodes', 'action' => 'add'), array('lang' => '[a-z]{2}')); - -Router::connect('/comments/:id/*', array('controller' => 'comments', 'action' => 'index'), array('id' => '[0-9]+', 'lang' => 'en')); -Router::connect('/:lang/comments/:id/*', array('controller' => 'comments', 'action' => 'index'), array('id' => '[0-9]+', 'lang' => '[a-z]{2}')); - -Router::connect('/comment/*', array('controller' => 'comments', 'action' => 'add'), array('lang' => 'en')); -Router::connect('/:lang/comment/*', array('controller' => 'comments', 'action' => 'add'), array('lang' => '[a-z]{2}')); - -Router::connect('/admin', array('prefix' => 'admin', 'controller' => 'revisions', 'action' => 'pending', 'admin' => true), array('admin' => true)); -Router::connect('/:lang/admin', array('prefix' => 'admin', 'controller' => 'revisions', 'action' => 'pending', 'admin' => true), array('admin' => true, 'lang' => '[a-z]{2}')); - -Router::connect('/img/*', array('controller' => 'attachments', 'action' => 'view'), array('lang' => 'en')); // Legacy Router::connect('/chapter/*', array('controller' => 'redirect', 'action' => 'process', 'chapter')); Router::connect('/appendix/*', array('controller' => 'redirect', 'action' => 'process', 'appendix')); - -if (isset($fromUrl) && strpos('admin', $fromUrl) !== false) { - Router::connectNamed(array('query', 'collection', 'lang'), array('greedy' => false, 'default' => true)); +// missing images +Router::connect('/img/*', array('controller' => 'attachments', 'action' => 'view'), array('lang' => $defaultLang)); + +$routes = array( + array('/', array('controller' => 'nodes', 'action' => 'index'), array()), + array('/comments/:id/*', array('controller' => 'comments', 'action' => 'index'), array('pass' => array('id'), 'id' => '[0-9]+')), + array('/comments/:action/*', array('controller' => 'comments', 'action' => 'index'), array()), + /* array('/:action/*', array('controller' => 'nodes'), array('action' => 'add|compare|complete|edit|history|stats|toc|todo|view')), */ + array('/add/*', array('controller' => 'nodes', 'action' => 'add'), array()), + array('/compare/*', array('controller' => 'nodes', 'action' => 'compare'), array()), + array('/complete/*', array('controller' => 'nodes', 'action' => 'complete'), array()), + array('/edit/*', array('controller' => 'nodes', 'action' => 'edit'), array()), + array('/history/*', array('controller' => 'nodes', 'action' => 'history'), array()), + array('/stats/*', array('controller' => 'nodes', 'action' => 'stats'), array()), + array('/toc/*', array('controller' => 'nodes', 'action' => 'toc'), array()), + array('/todo/*', array('controller' => 'nodes', 'action' => 'todo'), array()), + array('/view/*', array('controller' => 'nodes', 'action' => 'view'), array()), + /* array('/:action/*', array('controller' => 'revisions'), array('action' => 'search|results')), */ + array('/search/*', array('controller' => 'revisions', 'action' => 'search'), array()), + array('/results/*', array('controller' => 'revisions', 'action' => 'results'), array()), + array('/changes/:action/*', array('controller' => 'changes', 'action' => 'index'), array()), + array('/nodes/:action/*', array('controller' => 'nodes', 'action' => 'index'), array()), + array('/revisions/:action/*', array('controller' => 'revisions', 'action' => 'index'), array()), + array('/users/:action/*', array('plugin' => 'users', 'controller' => 'users', 'action' => 'index'), array()), + array('/admin/users/:action/*', array('prefix' => 'admin', 'plugin' => 'users', 'controller' => 'users', 'action' => 'index', 'admin' => true), array()), + array('/admin', array('controller' => 'revisions', 'action' => 'pending', 'admin' => true), array()), + array('/admin/:controller/:action/*', array('controller' => 'revisions', 'action' => 'pending', 'admin' => true), array()), + array('/:controller/:action/*', array('controller' => 'nodes', 'action' => 'index'), array()) +); +foreach ($routes as $route) { + $route[1]['lang'] = $defaultLang; + $route[1]['theme'] = 'mobile'; + Router::connect('/m' . $route[0], $route[1], $route[2]); + Router::connect('/m/:lang' . $route[0], $route[1], $route[2]); + + $route[1]['theme'] = 'default'; // default layout + + $route[2]['lang'] = '[a-z]{2}'; + Router::connect($route[0], $route[1], $route[2]); + Router::connect('/:lang' . $route[0], $route[1], $route[2]); } ?> \ No newline at end of file diff --git a/config/sql/complete.php b/config/sql/complete.php new file mode 100644 index 0000000..a9b179a --- /dev/null +++ b/config/sql/complete.php @@ -0,0 +1,143 @@ +<?php +/* Cakebook schema generated on: 2008-11-21 11:11:33 : 1227265113*/ +class AppSchema extends CakeSchema { + var $name = 'App'; + + function before($event = array()) { + return true; + } + + function after($event = array()) { + } + + var $attachments = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), + 'class' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 30, 'key' => 'index'), + 'foreign_id' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 36), + 'filename' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'ext' => array('type' => 'string', 'null' => false, 'default' => 'gif', 'length' => 6), + 'dir' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'mimetype' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 30), + 'filesize' => array('type' => 'integer', 'null' => true, 'default' => NULL), + 'height' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 4), + 'width' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 4), + 'description' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 100), + 'checksum' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 32), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'idxfk_foreign' => array('column' => array('class', 'foreign_id'), 'unique' => 0)) + ); + var $changes = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), + 'revision_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), + 'author_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), + 'status_from' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 10), + 'status_to' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 10), + 'comment' => array('type' => 'string', 'null' => false, 'default' => NULL), + 'created' => array('type' => 'datetime', 'null' => false, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $comments = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'node_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10), + 'revision_id' => array('type' => 'integer', 'null' => true, 'default' => '0', 'length' => 10), + 'lang' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 2), + 'title' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 150), + 'author' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'email' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'url' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'body' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'published' => array('type' => 'boolean', 'null' => false, 'default' => '1'), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $groups = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'level_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 20), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $levels = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 20), + 'value' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 3), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $nodes = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'lft' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'index'), + 'rght' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'index'), + 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'status' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 2), + 'comment_level' => array('type' => 'integer', 'null' => false, 'default' => '200', 'length' => 4), + 'edit_level' => array('type' => 'integer', 'null' => false, 'default' => '200', 'length' => 4), + 'show_in_toc' => array('type' => 'boolean', 'null' => false, 'default' => '1'), + 'depth' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 2), + 'sequence' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 20), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'LFT_RGHT' => array('column' => array('lft', 'rght'), 'unique' => 0), 'RGHT_LFT' => array('column' => array('rght', 'lft'), 'unique' => 0)) + ); + var $profiles = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10, 'key' => 'unique'), + 'published' => array('type' => 'boolean', 'null' => false, 'default' => '0'), + 'location' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'interests' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'occupation' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'icq' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 20), + 'aim' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'yahoo' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'msnm' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'jabber' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'time_zone' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'birthday' => array('type' => 'date', 'null' => true, 'default' => NULL), + 'user_icon' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'signature' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'url' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'bio' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'USER_ID_UNIQUE_INDEX' => array('column' => 'user_id', 'unique' => 1)) + ); + var $revisions = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'node_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'index'), + 'under_node_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'after_node_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'status' => array('type' => 'string', 'null' => false, 'default' => 'pending', 'length' => 30), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10), + 'lang' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 3), + 'slug' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), + 'title' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200), + 'content' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'type' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), + 'reason' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 300), + 'flags' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 100), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'node_id' => array('column' => array('node_id', 'lang', 'status'), 'unique' => 0)) + ); + var $users = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'group_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'level_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'realname' => array('type' => 'string', 'null' => false), + 'username' => array('type' => 'string', 'null' => false, 'key' => 'unique'), + 'email' => array('type' => 'string', 'null' => false, 'key' => 'unique'), + 'psword' => array('type' => 'string', 'null' => false), + 'temppassword' => array('type' => 'string', 'null' => false), + 'tos' => array('type' => 'boolean', 'null' => false, 'default' => '0'), + 'mail_comments' => array('type' => 'boolean', 'null' => false, 'default' => '1'), + 'email_authenticated' => array('type' => 'boolean', 'null' => true, 'default' => NULL), + 'email_token' => array('type' => 'string', 'null' => false, 'length' => 45), + 'email_token_expires' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'display_name' => array('type' => 'boolean', 'null' => true, 'default' => '0'), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'USERNAME_UNIQUE_INDEX' => array('column' => 'username', 'unique' => 1), 'EMAIL_UNIQUE_INDEX' => array('column' => 'email', 'unique' => 1)) + ); +} +?> \ No newline at end of file diff --git a/config/sql/complete.sql b/config/sql/complete.sql new file mode 100644 index 0000000..e2cefdf --- /dev/null +++ b/config/sql/complete.sql @@ -0,0 +1,140 @@ +#Cookbook sql generated on: 2008-11-21 11:11:00 : 1227265140 + +DROP TABLE IF EXISTS `attachments`; +DROP TABLE IF EXISTS `changes`; +DROP TABLE IF EXISTS `comments`; +DROP TABLE IF EXISTS `groups`; +DROP TABLE IF EXISTS `levels`; +DROP TABLE IF EXISTS `nodes`; +DROP TABLE IF EXISTS `profiles`; +DROP TABLE IF EXISTS `revisions`; +DROP TABLE IF EXISTS `users`; + + +CREATE TABLE `attachments` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `class` varchar(30) NOT NULL, + `foreign_id` varchar(36) NOT NULL, + `filename` varchar(255) DEFAULT NULL, + `ext` varchar(6) DEFAULT 'gif' NOT NULL, + `dir` varchar(255) DEFAULT NULL, + `mimetype` varchar(30) DEFAULT NULL, + `filesize` int(11) DEFAULT NULL, + `height` int(4) DEFAULT NULL, + `width` int(4) DEFAULT NULL, + `description` varchar(100) NOT NULL, + `checksum` varchar(32) DEFAULT NULL, + `created` datetime DEFAULT NULL, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`), + KEY idxfk_foreign (`class`, `foreign_id`)); + +CREATE TABLE `changes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `revision_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `author_id` int(11) NOT NULL, + `status_from` varchar(10) NOT NULL, + `status_to` varchar(10) NOT NULL, + `comment` varchar(255) NOT NULL, + `created` datetime NOT NULL, PRIMARY KEY (`id`)); + +CREATE TABLE `comments` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `node_id` int(10) DEFAULT 0 NOT NULL, + `user_id` int(10) NOT NULL, + `revision_id` int(10) DEFAULT 0, + `lang` varchar(2) NOT NULL, + `title` varchar(150) DEFAULT NULL, + `author` varchar(255) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `body` text DEFAULT NULL, + `published` tinyint(1) DEFAULT 1 NOT NULL, + `created` datetime DEFAULT NULL, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`)); + +CREATE TABLE `groups` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `level_id` int(10) DEFAULT 0 NOT NULL, + `name` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`)); + +CREATE TABLE `levels` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `name` varchar(20) DEFAULT NULL, + `value` int(3) DEFAULT NULL, PRIMARY KEY (`id`)); + +CREATE TABLE `nodes` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `lft` int(10) NOT NULL, + `rght` int(10) NOT NULL, + `parent_id` int(10) DEFAULT NULL, + `status` int(2) DEFAULT 0 NOT NULL, + `comment_level` int(4) DEFAULT 200 NOT NULL, + `edit_level` int(4) DEFAULT 200 NOT NULL, + `show_in_toc` tinyint(1) DEFAULT 1 NOT NULL, + `depth` int(2) DEFAULT 0 NOT NULL, + `sequence` varchar(20) NOT NULL, + `created` datetime DEFAULT NULL, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`), + KEY LFT_RGHT (`lft`, `rght`), + KEY RGHT_LFT (`rght`, `lft`)); + +CREATE TABLE `profiles` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `user_id` int(10) DEFAULT 0 NOT NULL, + `published` tinyint(1) DEFAULT 0 NOT NULL, + `location` varchar(255) DEFAULT NULL, + `interests` varchar(255) DEFAULT NULL, + `occupation` varchar(255) DEFAULT NULL, + `icq` int(20) DEFAULT NULL, + `aim` varchar(255) DEFAULT NULL, + `yahoo` varchar(255) DEFAULT NULL, + `msnm` varchar(255) DEFAULT NULL, + `jabber` varchar(255) DEFAULT NULL, + `time_zone` varchar(255) DEFAULT NULL, + `birthday` date DEFAULT NULL, + `user_icon` varchar(255) DEFAULT NULL, + `signature` text DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `bio` text DEFAULT NULL, PRIMARY KEY (`id`), + UNIQUE KEY USER_ID_UNIQUE_INDEX (`user_id`)); + +CREATE TABLE `revisions` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `node_id` int(10) NOT NULL, + `under_node_id` int(10) DEFAULT NULL, + `after_node_id` int(10) DEFAULT NULL, + `status` varchar(30) DEFAULT 'pending' NOT NULL, + `user_id` int(10) NOT NULL, + `lang` varchar(3) DEFAULT NULL, + `slug` varchar(50) DEFAULT NULL, + `title` varchar(200) DEFAULT NULL, + `content` text DEFAULT NULL, + `type` varchar(50) DEFAULT NULL, + `reason` varchar(300) DEFAULT NULL, + `flags` varchar(100) DEFAULT NULL, + `created` datetime DEFAULT NULL, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`), + KEY node_id (`node_id`, `lang`, `status`)); + +CREATE TABLE `users` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `group_id` int(10) DEFAULT 0 NOT NULL, + `level_id` int(10) DEFAULT 0 NOT NULL, + `realname` varchar(255) NOT NULL, + `username` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `psword` varchar(255) NOT NULL, + `temppassword` varchar(255) NOT NULL, + `tos` tinyint(1) DEFAULT 0 NOT NULL, + `mail_comments` tinyint(1) DEFAULT 1 NOT NULL, + `email_authenticated` tinyint(1) DEFAULT NULL, + `email_token` varchar(45) NOT NULL, + `email_token_expires` datetime DEFAULT NULL, + `created` datetime DEFAULT NULL, + `modified` datetime DEFAULT NULL, + `display_name` tinyint(1) DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY USERNAME_UNIQUE_INDEX (`username`), + UNIQUE KEY EMAIL_UNIQUE_INDEX (`email`)); + diff --git a/config/sql/sample_data.sql b/config/sql/sample_data.sql deleted file mode 100644 index 0362f7d..0000000 --- a/config/sql/sample_data.sql +++ /dev/null @@ -1,14 +0,0 @@ -INSERT INTO `nodes` (`id`, `lft`, `rght`, `parent_id`, `status`, `comment_level`, `edit_level`, `depth`, `sequence`, `created`, `modified`) VALUES -(1, 1, 6, NULL, 1, 200, 600, 0, '', '2008-01-16 17:08:41', '2008-07-09 20:09:59'), -(2, 2, 5, 1, 1, 200, 600, 1, '', '2008-01-16 17:08:41', '2008-07-09 20:09:59'), -(3, 3, 4, 2, 1, 200, 200, 2, '', '2008-01-16 17:08:41', '2008-07-09 20:09:59'); - --- --- Dumping data for table `revisions` --- - -INSERT INTO `revisions` (`id`, `node_id`, `under_node_id`, `after_node_id`, `status`, `user_id`, `lang`, `slug`, `title`, `content`, `type`, `reason`, `flags`, `created`, `modified`) VALUES -(1, 2, 0, 0, 'current', 1, 'en', '1-2-collection', '1.2 Collection', '<p>All things related to CakePHP version 1.2</p>', NULL, NULL, '', '2008-02-19 01:30:18', '2008-02-19 01:30:19'), -(2, 1, 0, 0, 'current', 1, 'en', 'collection-index', 'Collection index', '<p>All you ever wanted to know about CakePHP.</p>', NULL, '', '', '2008-07-01 07:56:33', '2008-07-01 11:17:48'), -(3, 3, 0, 0, 'current', 1, 'en', 'the-manual', 'The Manual', '<p><strong><a href="http://book.cakephp.org/view/305/the-manual">Click here for the CakePHP 1.1.x version of the manual</a></strong></p>\r\n\r\n<p>Welcome to the Cookbook, the CakePHP documentation. The Cookbook is a wiki-like system allowing contributions from the public. With an open system, we hope to maintain a high level of quality, validity, and accuracy for the CakePHP documentation. The Cookbook also makes it easy for anybody to contribute.</p>\r\n\r\n<p>A <em><strong>huge</strong></em> thank you to <a href="http://www.ad7six.com/" title="Mi Blog">AD7six</a>, who championed the Cookbook by putting in endless hours developing, testing and improving this application.</p>\r\n<h4>How it Works:</h4>\r\n<ol>\r\n <li>You visit the site and notice an error, something that is incomplete, something that hasn''t been covered at all, or something that just isn''t worded to your liking.</li>\r\n <li>Log in to Cookbook using your <a href="http://bakery.cakephp.org" title="The Bakery: Everything CakePHP">Bakery</a> account.</li>\r\n <li>Submit additions/edits for review using valid, semantic HTML.</li>\r\n <li>Check back in the next day or so to see your changes approved.</li>\r\n <li>Please review <a href="http://manual.cakephp.org/view/482/contributing-to-the-cookbook">the guidelines for submitting to the Cookbook</a> to ensure consistency.</li>\r\n</ol>\r\n<br/>\r\n<h4>Translations</h4>\r\n<p>Email John David Anderson (docs at cakephp dot org) or on IRC (#cakephp on freenode as _psychic_) to discuss any translation efforts you would like to participate in.</p>\r\n<p>Translator tips:</p>\r\n<ul>\r\n <li>Do not use <a href="http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references" title="What Are HTML Entities?">html entities</a> for accented characters, the book uses UTF-8.</li>\r\n <li>Use <a href="http://en.wikipedia.org/wiki/Register_%28linguistics%29" title="What is Informal Form?">Informal Form</a>.</li>\r\n <li>Translate both the content and the title at the same time.</li>\r\n <li>Browse and edit in the language the content is being translated to - otherwise it get''s logged as an English Edit with only a slim chance that a reviewer knows what language you are writing in.</li>\r\n</ul>\r\n<br />\r\n<p>We''re committed to making the documentation for CakePHP better than it has ever been. We hope you''ll join us by using the Cookbook and giving back to a project that we''ve all benefited so much from.</p>', NULL, 'I changed the title', '', '2008-07-08 10:43:59', '2008-07-09 11:06:38'); - diff --git a/config/sql/schema.php b/config/sql/schema.php index f11a0b9..726a1b5 100644 --- a/config/sql/schema.php +++ b/config/sql/schema.php @@ -1,8 +1,7 @@ -<?php -/* SVN FILE: $Id: schema.php 673 2008-10-06 14:05:17Z AD7six $ */ -/* Cookbook schema generated on: 2008-07-28 20:07:15 : 1217271015*/ -class CookbookSchema extends CakeSchema { - var $name = 'Cookbook'; +<?php +/* Cakebook schema generated on: 2008-12-23 09:12:43 : 1230022723*/ +class CakebookSchema extends CakeSchema { + var $name = 'Cakebook'; function before($event = array()) { return true; @@ -12,81 +11,81 @@ class CookbookSchema extends CakeSchema { } var $attachments = array( - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'user_id' => array('type'=>'integer', 'null' => false, 'default' => NULL), - 'class' => array('type'=>'string', 'null' => false, 'default' => NULL, 'length' => 30, 'key' => 'index'), - 'foreign_id' => array('type'=>'string', 'null' => false, 'default' => NULL, 'length' => 36), - 'filename' => array('type'=>'string', 'null' => true, 'default' => NULL), - 'ext' => array('type'=>'string', 'null' => false, 'default' => 'gif', 'length' => 6), - 'dir' => array('type'=>'string', 'null' => true, 'default' => NULL), - 'mimetype' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 30), - 'filesize' => array('type'=>'integer', 'null' => true, 'default' => NULL), - 'height' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 4), - 'width' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 4), - 'description' => array('type'=>'string', 'null' => false, 'default' => NULL, 'length' => 100), - 'checksum' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 32), - 'created' => array('type'=>'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type'=>'datetime', 'null' => true, 'default' => NULL), + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), + 'class' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 30, 'key' => 'index'), + 'foreign_id' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 36), + 'filename' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'ext' => array('type' => 'string', 'null' => false, 'default' => 'gif', 'length' => 6), + 'dir' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'mimetype' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 30), + 'filesize' => array('type' => 'integer', 'null' => true, 'default' => NULL), + 'height' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 4), + 'width' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 4), + 'description' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 100), + 'checksum' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 32), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'idxfk_foreign' => array('column' => array('class', 'foreign_id'), 'unique' => 0)) ); var $changes = array( - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'revision_id' => array('type'=>'integer', 'null' => false, 'default' => NULL), - 'user_id' => array('type'=>'integer', 'null' => false, 'default' => NULL), - 'author_id' => array('type'=>'integer', 'null' => false, 'default' => NULL), - 'status_from' => array('type'=>'string', 'null' => false, 'default' => NULL, 'length' => 10), - 'status_to' => array('type'=>'string', 'null' => false, 'default' => NULL, 'length' => 10), - 'comment' => array('type'=>'string', 'null' => false, 'default' => NULL), - 'created' => array('type'=>'datetime', 'null' => false, 'default' => NULL), + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), + 'revision_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), + 'author_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), + 'status_from' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 10), + 'status_to' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 10), + 'comment' => array('type' => 'string', 'null' => false, 'default' => NULL), + 'created' => array('type' => 'datetime', 'null' => false, 'default' => NULL), 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) ); var $comments = array( - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), - 'node_id' => array('type'=>'integer', 'null' => false, 'default' => '0', 'length' => 10), - 'user_id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10), - 'revision_id' => array('type'=>'integer', 'null' => true, 'default' => '0', 'length' => 10), - 'lang' => array('type'=>'string', 'null' => false, 'default' => NULL, 'length' => 2), - 'title' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 150), - 'author' => array('type'=>'string', 'null' => true, 'default' => NULL), - 'email' => array('type'=>'string', 'null' => true, 'default' => NULL), - 'url' => array('type'=>'string', 'null' => true, 'default' => NULL), - 'body' => array('type'=>'text', 'null' => true, 'default' => NULL), - 'published' => array('type'=>'boolean', 'null' => false, 'default' => '1'), - 'created' => array('type'=>'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type'=>'datetime', 'null' => true, 'default' => NULL), + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'node_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10), + 'revision_id' => array('type' => 'integer', 'null' => true, 'default' => '0', 'length' => 10), + 'lang' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 2), + 'title' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 150), + 'author' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'email' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'url' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'body' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'published' => array('type' => 'boolean', 'null' => false, 'default' => '1'), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) ); var $nodes = array( - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), - 'lft' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'index'), - 'rght' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'index'), - 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'status' => array('type'=>'integer', 'null' => false, 'default' => '0', 'length' => 2), - 'comment_level' => array('type'=>'integer', 'null' => false, 'default' => '200', 'length' => 4), - 'edit_level' => array('type'=>'integer', 'null' => false, 'default' => '200', 'length' => 4), - 'show_in_toc' => array('type'=>'boolean', 'null' => false, 'default' => '1'), - 'depth' => array('type'=>'integer', 'null' => false, 'default' => '0', 'length' => 2), - 'sequence' => array('type'=>'string', 'null' => false, 'default' => NULL, 'length' => 20), - 'created' => array('type'=>'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type'=>'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'LFT_RGHT' => array('column' => array('lft', 'rght'), 'unique' => 0), 'RGHT_LFT' => array('column' => array('lft', 'rght', 'rght', 'lft'), 'unique' => 0)) + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'lft' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'index'), + 'rght' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'index'), + 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'status' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 2), + 'comment_level' => array('type' => 'integer', 'null' => false, 'default' => '200', 'length' => 4), + 'edit_level' => array('type' => 'integer', 'null' => false, 'default' => '200', 'length' => 4), + 'depth' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 2), + 'sequence' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 20), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'show_in_toc' => array('type' => 'boolean', 'null' => false, 'default' => '1'), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'LFT_RGHT' => array('column' => array('lft', 'rght'), 'unique' => 0), 'RGHT_LFT' => array('column' => array('rght', 'lft'), 'unique' => 0)) ); var $revisions = array( - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), - 'node_id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'index'), - 'under_node_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'after_node_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'status' => array('type'=>'string', 'null' => false, 'default' => 'pending', 'length' => 30), - 'user_id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10), - 'lang' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 3), - 'slug' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 50), - 'title' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 200), - 'content' => array('type'=>'text', 'null' => true, 'default' => NULL), - 'type' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 50), - 'reason' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 300), - 'flags' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 100), - 'created' => array('type'=>'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type'=>'datetime', 'null' => true, 'default' => NULL), + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'node_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'index'), + 'under_node_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'after_node_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'status' => array('type' => 'string', 'null' => false, 'default' => 'pending', 'length' => 30), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10), + 'lang' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 3), + 'slug' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), + 'title' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200), + 'content' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'type' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), + 'reason' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 300), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'flags' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 100), 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'node_id' => array('column' => array('node_id', 'lang', 'status'), 'unique' => 0)) ); } diff --git a/config/sql/schema.sql b/config/sql/schema.sql index b5169a6..ffd0e18 100644 --- a/config/sql/schema.sql +++ b/config/sql/schema.sql @@ -1,4 +1,4 @@ -#Cookbook sql generated on: 2008-07-28 20:07:20 : 1217271020 +#Cakebook sql generated on: 2008-12-23 09:12:48 : 1230022728 DROP TABLE IF EXISTS `attachments`; DROP TABLE IF EXISTS `changes`; @@ -22,8 +22,7 @@ CREATE TABLE `attachments` ( `description` varchar(100) NOT NULL, `checksum` varchar(32) DEFAULT NULL, `created` datetime DEFAULT NULL, - `modified` datetime DEFAULT NULL, - PRIMARY KEY (`id`), + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY idxfk_foreign (`class`, `foreign_id`)); CREATE TABLE `changes` ( @@ -34,8 +33,7 @@ CREATE TABLE `changes` ( `status_from` varchar(10) NOT NULL, `status_to` varchar(10) NOT NULL, `comment` varchar(255) NOT NULL, - `created` datetime NOT NULL, - PRIMARY KEY (`id`)); + `created` datetime NOT NULL, PRIMARY KEY (`id`)); CREATE TABLE `comments` ( `id` int(10) NOT NULL AUTO_INCREMENT, @@ -50,8 +48,7 @@ CREATE TABLE `comments` ( `body` text DEFAULT NULL, `published` tinyint(1) DEFAULT 1 NOT NULL, `created` datetime DEFAULT NULL, - `modified` datetime DEFAULT NULL, - PRIMARY KEY (`id`)); + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`)); CREATE TABLE `nodes` ( `id` int(10) NOT NULL AUTO_INCREMENT, @@ -61,14 +58,13 @@ CREATE TABLE `nodes` ( `status` int(2) DEFAULT 0 NOT NULL, `comment_level` int(4) DEFAULT 200 NOT NULL, `edit_level` int(4) DEFAULT 200 NOT NULL, - `show_in_toc` tinyint(1) DEFAULT 1 NOT NULL, `depth` int(2) DEFAULT 0 NOT NULL, `sequence` varchar(20) NOT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, - PRIMARY KEY (`id`), + `show_in_toc` tinyint(1) DEFAULT 1 NOT NULL, PRIMARY KEY (`id`), KEY LFT_RGHT (`lft`, `rght`), - KEY RGHT_LFT (`lft`, `rght`, `rght`, `lft`)); + KEY RGHT_LFT (`rght`, `lft`)); CREATE TABLE `revisions` ( `id` int(10) NOT NULL AUTO_INCREMENT, @@ -83,9 +79,8 @@ CREATE TABLE `revisions` ( `content` text DEFAULT NULL, `type` varchar(50) DEFAULT NULL, `reason` varchar(300) DEFAULT NULL, - `flags` varchar(100) DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, - PRIMARY KEY (`id`), + `flags` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`), KEY node_id (`node_id`, `lang`, `status`)); diff --git a/config/sql/schema_uuid.php b/config/sql/schema_uuid.php index 2fa1fc4..3ba189a 100644 --- a/config/sql/schema_uuid.php +++ b/config/sql/schema_uuid.php @@ -1,5 +1,4 @@ -<?php -/* SVN FILE: $Id: schema_uuid.php 566 2008-07-14 09:23:58Z AD7six $ */ +<?php /* Cookbook schema generated on: 2008-07-14 11:07:35 : 1216026935*/ class CookbookUuidSchema extends CakeSchema { var $name = 'CookbookUuid'; @@ -71,4 +70,4 @@ class CookbookUuidSchema extends CakeSchema { 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'node_id' => array('column' => array('node_id', 'lang', 'status'), 'unique' => 0)) ); } -?> +?> \ No newline at end of file diff --git a/controllers/attachments_controller.php b/controllers/attachments_controller.php index 4bc0824..6ad73e2 100755 --- a/controllers/attachments_controller.php +++ b/controllers/attachments_controller.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: attachments_controller.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for attachments_controller.php * @@ -18,9 +17,6 @@ * @package base * @subpackage base.controllers * @since v 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/controllers/changes_controller.php b/controllers/changes_controller.php index 69796b0..e0dbb8c 100644 --- a/controllers/changes_controller.php +++ b/controllers/changes_controller.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: changes_controller.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for changes_controller.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.controllers * @since 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -140,7 +136,7 @@ class ChangesController extends AppController { if (isset($this->params['named']['user'])) { $userId = $this->Change->User->field('id', array('username' => $this->params['named']['user'])); if ($userId) { - $conditions['Change.user_id'] = $userId; + $conditions['Change.author_id'] = $userId; $this->pageTitle .= ' ' . sprintf(__('by %s', true), $this->params['named']['user']); } } diff --git a/controllers/comments_controller.php b/controllers/comments_controller.php index 936f2ad..0cf4144 100644 --- a/controllers/comments_controller.php +++ b/controllers/comments_controller.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: comments_controller.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for comments_controller.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.controllers * @since 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -63,9 +59,21 @@ class CommentsController extends AppController { * @return void */ function admin_index($nodeId=null) { + $counts = $this->Comment->find('all', array( + 'recursive' => -1, + 'fields' => array('lang', 'COUNT(id) as count'), + 'order' => array('lang'), + 'group' => 'lang' + )); + $counts = Set::combine($counts, '/Comment/lang', '/0/count'); + $language = isset($this->passedArgs['language'])?$this->passedArgs['language']:$this->params['lang']; + $this->set(compact('counts', 'language')); + $this->Comment->recursive = 2; $this->paginate['limit']= 10; $this->paginate['order'] = 'Comment.id desc'; + unset ($this->params['named']['language']); + $this->params['named']['lang'] = $language; if ($nodeId) { $this->params['named']['node_id'] = $nodeId; } diff --git a/controllers/components/filter.php b/controllers/components/filter.php index e06e186..888629b 100644 --- a/controllers/components/filter.php +++ b/controllers/components/filter.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: filter.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for filter.php * @@ -18,9 +17,6 @@ * @package mi-base * @subpackage mi-base.app.controllers * @since v 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/controllers/components/unique_url.php b/controllers/components/unique_url.php new file mode 100644 index 0000000..7d74eac --- /dev/null +++ b/controllers/components/unique_url.php @@ -0,0 +1,88 @@ +<?php +/** + * Short description for unique_url.php + * + * Long description for unique_url.php + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> + * @link http://www.cakephp.org + * @package cookbook + * @subpackage cookbook.controllers.components + * @since v 1.0 + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +class UniqueUrlComponent extends Object { +/** + * here property + * + * @var mixed null + * @access public + */ + var $here = null; +/** + * initialize method + * + * @param mixed $controller + * @return void + * @access public + */ + function initialize (&$controller) { + $this->controller =& $controller; + } +/** + * Verify that the current url is the right url to view the content + * + * Disabled if debug is > 1 + * Doesn't do anything for admin methods, requestAction calls, ajax requests, or if data has been submitted. + * Otherwise, check the url matches what the router says should be the url, check slugs and 301 redirect to the + * correct url if the url doesn't match + * + * @return void + * @access public + */ + function check () { + if (isset($this->controller->params['requested']) || isset($this->controller->params['admin']) || + isset($this->controller->params['isAjax']) || $this->controller->data) { + return; + } + $this->here = $here = '/' . trim($this->controller->params['url']['url'], '/'); + $params =& $this->controller->params; + $defaults = array( + 'controller' => Inflector::underscore($this->controller->name), + 'action' => $this->controller->action, + 'admin' => !empty($this->controller->params['admin']), + 'lang' => $params['lang'], + 'theme' => $params['theme'], + ); + $url = am($defaults, $this->controller->passedArgs); + if (isset($url[0]) && $params['url']['ext'] === 'html') { + $id = Configure::read('Site.homeNode'); + if (empty($url['admin']) && $url['controller'] === 'nodes' && $url['action'] === 'view' && $url[0] == $id) { + $url = am($defaults, array('action' => 'index')); + } + } + if (isset($url[0])) { + $conditions = array(); + $conditions['Node.id'] = $url[0]; + $fields = array ('Node.id', 'Revision.slug'); + $recursive = 0; + $result = $this->controller->Node->find('first', compact('conditions', 'fields', 'recursive')); + if (!$result) { + $this->controller->redirect($this->controller->Session->read('referer'), null, true); + } + $url[1] = $result['Revision']['slug']; + } + $normalized = Router::normalize($url); + if ($normalized !== $here) { + return $this->controller->redirect($normalized, 301); + } + } +} \ No newline at end of file diff --git a/controllers/nodes_controller.php b/controllers/nodes_controller.php index 15d3c82..64caf6d 100644 --- a/controllers/nodes_controller.php +++ b/controllers/nodes_controller.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: nodes_controller.php 704 2008-11-19 12:15:11Z AD7six $ */ /** * Short description for nodes_controller.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.controllers * @since 1.0 - * @version $Revision: 704 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-19 13:15:11 +0100 (Wed, 19 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -70,10 +66,21 @@ class NodesController extends AppController { */ var $paginate = array ('limit' => 2); /** - * beforeFilter function + * components property * - * First, check if the url matches routes and if not redirect - * Second, check the slug matches and if not redirect + * @var array + * @access public + */ + var $components = array('UniqueUrl'); +/** + * helpers property + * + * @var array + * @access public + */ + var $helpers = array('Theme'); +/** + * beforeFilter function * * @access public * @return void @@ -85,67 +92,13 @@ class NodesController extends AppController { } $this->Node->Revision->currentUserId = $this->Node->currentUserId; if (!isset($this->params['requested']) && $this->action != 'todo') { - $urlIsCorrect = true; - if ((!isset($this->params['admin']) && - (($this->params['lang'] == 'en' && $this->params['url']['url'] != '/') - || ($this->params['lang'] != 'en' && $this->params['url']['url'] != '/' . $this->params['lang']))) - ) { - if ($this->action == 'view' && isset($this->params['pass'][0]) && $this->params['pass'][0] == Configure::read('Site.homeNode')) { - if ($this->params['lang'] == 'en') { - $urlIsCorrect = false; - $url = '/'; - } elseif ($this->params['url']['url'] != $this->params['lang']) { - $urlIsCorrect = false; - $url = '/' . $this->params['lang']; - } - } - if ($this->params['lang'] != 'en') { - $this->params['pass']['lang'] = $this->params['lang']; - } - if ($this->params['url']['ext'] == 'html') { - $normalized = Router::normalize($this->params['pass']); - } else { - $normalized = Router::normalize(am($this->params['pass'], array('ext' => $this->params['url']['ext']))); - } - if ($normalized != '/' . $this->params['url']['url']) { - $urlIsCorrect = false; - $url = '/' . $normalized; - } - } - if (!isset($this->params['admin']) && isset($this->params['pass'][0])) { - $urlSlug = isset($this->params['pass'][1])?$this->params['pass'][1]:''; - $conditions['Node.id'] = $this->params['pass'][0]; - $fields = array ('Node.id', 'Node.id', 'Revision.slug'); - $recursive = 0; - $result = $this->Node->find('first', compact('conditions', 'fields', 'recursive')); - if ($result) { - $this->Node->id = $this->currentNode = $result['Node']['id']; - } else { - $this->redirect($this->Session->read('referer'), null, true); - } - $base = '/'; - $here = '/' . $this->params['url']['url']; - if ($this->params['lang'] != 'en') { - $base .= $this->params['lang'] . '/'; - if (strlen($here) < 4 ) { - $here .= '/'; - } - } - if (!($this->data)&&($base != $here)) { - if ($urlSlug<>$result['Revision']['slug']) { - $urlIsCorrect = false; - $url = array($result['Node']['id'], $result['Revision']['slug']); - } - } - } elseif (isset($this->params['pass'][0])) { - $this->Node->id = $this->currentNode = $this->params['pass'][0]; + if ($this->action === 'view') { + $this->Node->id = $this->currentNode = Configure::read('Site.homeNode'); // default } - if (!$urlIsCorrect) { - if ($this->params['url']['ext'] != 'html') { - $url['ext'] = $this->params['url']['ext']; - } - $this->redirect($url, 301); + if (isset($this->passedArgs[0])) { + $this->Node->id = $this->currentNode = $this->passedArgs[0]; } + $this->UniqueUrl->check(); $fields = array ('Node.id', 'Node.depth', 'Node.id', 'Node.lft', 'Node.rght', 'Node.comment_level', 'Node.edit_level', 'Revision.id', 'Revision.slug', 'Revision.title', 'Revision.content'); if (!isset($this->currentNode)) { $topNode = $this->Node->find(array('Node.depth' => '0'), array('Node.id'), null, 0); @@ -154,8 +107,10 @@ class NodesController extends AppController { $this->currentPath = $this->Node->getPath($this->currentNode, $fields, 0); $this->set('currentPath', $this->currentPath); } - $this->Auth->allowedActions = array('index', 'view', 'single_page', 'toc', 'collections', 'app_name', - 'compare', 'history', 'stats', 'todo'); + if (!isset($this->params['url']['ext']) || $this->params['url']['ext'] != 'xml') { + $this->Auth->allowedActions = array('index', 'view', 'complete', 'toc', 'collections', + 'app_name', 'compare', 'history', 'stats', 'todo'); + } } /** * beforeRender function @@ -602,34 +557,36 @@ class NodesController extends AppController { * @access public * @return void */ - function collections($lang = 'en') { + function collections() { $this->autoRender = false; - $this->Node->setLanguage($lang); + $this->Node->setLanguage($this->params['lang']); $recursive = 0; $first = $this->Node->field('id', array('Node.parent_id' => null)); $conditions = array('Node.parent_id' => $first); $fields = array('Node.id', 'Revision.title', 'Revision.slug'); $data = $this->Node->find('all', compact('recursive', 'conditions', 'fields')); - cache('views/collections_' . $lang, serialize($data), CACHE_DURATION); + cache('views/collections_' . $this->params['lang'], serialize($data), CACHE_DURATION); return $data; } /** * app_name method * + * Only called by requestAction + * * @param string $lang * @return void * @access public */ - function app_name($lang = 'en') { + function app_name() { $this->autoRender = false; - $this->Node->setLanguage($lang); + $this->Node->setLanguage($this->params['lang']); $recursive = 0; $conditions = array('Node.parent_id' => null); $fields = array('Revision.title', 'Revision.content'); $data = $this->Node->find('first', compact('recursive', 'conditions', 'fields')); $return['name'] = $data['Revision']['title']; $return['tag_line'] = strip_tags($data['Revision']['content']); - cache('views/app_name_' . $lang, serialize($return), CACHE_DURATION); + cache('views/app_name_' . $this->params['lang'], serialize($return), CACHE_DURATION); return $return; } /** @@ -645,7 +602,7 @@ class NodesController extends AppController { $this->Node->id = $this->currentNode = $id = $this->Node->field('id', array('Node.depth' => 2)); } if ($this->params['url']['ext'] == 'xml') { - $url = array('action' => 'single_page', $id, $this->Node->Revision->field('slug', array('node_id' => $id)), 'ext' => 'xml'); + $url = array('action' => 'complete', $id, $this->Node->Revision->field('slug', array('node_id' => $id)), 'ext' => 'xml'); $this->redirect($url); } $fields = array ('Node.id', 'Node.depth', 'Node.id', 'Node.lft', 'Node.rght', 'Node.comment_level', 'Node.edit_level', 'Revision.id', 'Revision.slug', 'Revision.title', 'Revision.content'); @@ -724,8 +681,8 @@ class NodesController extends AppController { $pendingUpdates = $this->Node->Revision->find('all', compact('conditions', 'recursive', 'fields')); $pendingUpdates = Set::extract($pendingUpdates, '{n}.Revision.node_id'); $this->set(compact('pendingUpdates')); - if ($this->params['lang'] == 'en') { - $this->data = $this->paginate(array('Revision.content LIKE' => '<h')); + if ($this->params['lang'] === Configure::read('Languages.default')) { + $this->data = $this->paginate(array('Revision.content LIKE' => '%<h%')); return $this->render('english_todo'); } else { $this->data = $this->paginate(array('OR' => array('Revision.id' => null, 'Revision.flags LIKE' => 'englishChanged'))); @@ -741,7 +698,7 @@ class NodesController extends AppController { */ function view($nodeId = false, $slug = '') { if ($this->params['url']['ext'] == 'xml') { - $this->redirect(am(array('action' => 'single_page'), $this->passedArgs)); + $this->redirect(am(array('action' => 'complete'), $this->passedArgs)); } if (!$nodeId || $nodeId == Configure::read('Site.homeNode')) { $this->redirect(array('index')); @@ -755,13 +712,13 @@ class NodesController extends AppController { } } /** - * single_page function + * complete function * * @param mixed $nodeId * @access public * @return void */ - function single_page($nodeId = null) { + function complete($nodeId = null) { if ($this->params['url']['ext'] == 'xml') { $this->data = $this->Node->exportData($this->currentNode); $this->cacheAction = array('duration' => CACHE_DURATION, 'callbacks' => false); @@ -803,7 +760,7 @@ class NodesController extends AppController { if (!isset($counts[$lang])) { $counts[$lang] = 0; } - if ($lang == 'en') { + if ($lang == Configure::read('Languages.default')) { $userLimit = 15; } else { $userLimit = 6; @@ -926,7 +883,10 @@ class NodesController extends AppController { * @return void * @access public */ - function compare($id, $slug, $lang = 'en') { + function compare($id, $slug, $lang = null) { + if (!$lang) { + $lang = Configure::read('Languages.default'); + } if ($this->Node->language == $lang) { $this->Session->setFlash(__('This function is for comparing different (public) language content', true)); $this->redirect(array('action' => 'view', $id, $slug)); @@ -1001,10 +961,11 @@ class NodesController extends AppController { * @access public */ function history($id, $slug, $englishToo = false) { + $defaultLang = Configure::read('Languages.default'); $this->cacheAction = array('duration' => CACHE_DURATION, 'callbacks' => false); $language = array($this->params['lang']); - if ($englishToo && $this->params['lang'] != 'en') { - $language[] = 'en'; + if ($englishToo && $this->params['lang'] != $defaultLang) { + $language[] = $defaultLang; } $conditions['Revision.node_id'] = $id; $conditions['Revision.lang'] = $language; @@ -1063,6 +1024,7 @@ class NodesController extends AppController { set_time_limit(max(30, $count / 10)); $order = 'Node.lft'; $children = array(); + if ($viewAll) { $children = $this->Node->find('all',compact('conditions', 'fields', 'order', 'recursive')); } else { diff --git a/controllers/redirect_controller.php b/controllers/redirect_controller.php index 66c0d28..0922246 100755 --- a/controllers/redirect_controller.php +++ b/controllers/redirect_controller.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: redirect_controller.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file * @@ -20,9 +19,6 @@ * @package cookbook * @subpackage cookbook.controllers * @since v 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -57,7 +53,6 @@ class RedirectController extends AppController { */ function beforeFilter() { $this->Auth->allow('process'); - $this->params['lang'] = 'en'; } /** * process function. Based on the passed params, send the user to the equivalent page. diff --git a/controllers/revisions_controller.php b/controllers/revisions_controller.php index 5f2f69b..0316630 100755 --- a/controllers/revisions_controller.php +++ b/controllers/revisions_controller.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: revisions_controller.php 711 2008-11-19 18:20:57Z AD7six $ */ /** * Short description for revisions_controller.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.controllers * @since 1.0 - * @version $Revision: 711 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-19 19:20:57 +0100 (Wed, 19 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -258,14 +254,15 @@ class RevisionsController extends AppController { function admin_approve($id) { $data = $this->Revision->read(array('lang', 'node_id'), $id); $isSignificant = false; + $defaultLang = Configure::read('Languages.default'); if ( - $this->params['lang'] == 'en' && + $this->params['lang'] === $defaultLang && $data['Revision']['node_id'] && $this->Revision->find('list', array('conditions' => array( 'Revision.node_id' => $data['Revision']['node_id'], 'Revision.status' => array('current', 'pending'), - 'Revision.lang !=' => 'en' + 'Revision.lang !=' => $defaultLang )) ) ) { @@ -316,6 +313,7 @@ class RevisionsController extends AppController { * @access public */ function admin_reset() { + Configure::write('debug', 1); $this->Revision->reset(); $this->redirect($this->Session->read('referer'), null, false); } @@ -404,6 +402,7 @@ class RevisionsController extends AppController { if ($id) { return $this->redirect(array('action' => 'view', $id), null, true); } else { + //$this->Session->setFlash('No more pending revisions for that language'); return $this->redirect(array('action' => 'pending'), null, true); } } @@ -433,6 +432,7 @@ class RevisionsController extends AppController { function admin_invalid($fix = false) { $query = 'SELECT nodes.id, revisions.lang, count(revisions.id) FROM nodes left join revisions on revisions.node_id = nodes.id WHERE revisions.status = "current" GROUP BY nodes.id, revisions.lang HAVING count(revisions.id) > 1'; $results = $this->Revision->query($query); + $defaultLang = Configure::read('Languages.default'); if ($results) { if ($fix) { debug ($results); @@ -442,7 +442,7 @@ class RevisionsController extends AppController { $nodes = Set::extract('/nodes/id', $results); $this->params['named']['node_id'] = $nodes; $this->params['named']['status'] = 'current'; - $this->params['named']['lang'] = 'en'; + $this->params['named']['lang'] = $defaultLang; $this->admin_index(); $this->render('admin_index'); return; @@ -499,7 +499,7 @@ class RevisionsController extends AppController { } $this->Session->setFlash('Nodes with no current revision found'); $this->params['named']['node_id'] = array_keys($results); - $this->params['named']['lang'] = 'en'; + $this->params['named']['lang'] = $defaultLang; $this->admin_index(); $this->render('admin_index'); return; @@ -520,9 +520,23 @@ class RevisionsController extends AppController { * @return void */ function admin_pending () { + $counts = $this->Revision->find('all', array( + 'recursive' => -1, + 'fields' => array('lang', 'COUNT(id) as count'), + 'conditions' => array('status' => 'pending'), + 'order' => array('lang'), + 'group' => 'lang' + )); + $counts = Set::combine($counts, '/Revision/lang', '/0/count'); + $language = isset($this->passedArgs['language'])?$this->passedArgs['language']:$this->params['lang']; + + unset ($this->params['named']['language']); + $this->params['named']['lang'] = $language; + + $this->set(compact('counts', 'language')); $this->paginate['limit'] = 10; $this->paginate['order'] = 'Revision.id ASC'; - $this->paginate['conditions'] = array('Revision.status' => 'pending'); + $this->paginate['conditions'] = array('Revision.status' => 'pending', 'lang' => $language); $this->Revision->recursive = 1; $this->Revision->bindModel(array('belongsTo' => array( 'AfterNode' => array( @@ -636,12 +650,19 @@ class RevisionsController extends AppController { * @access public */ function view($id) { - $this->cacheAction = array('duration' => CACHE_DURATION, 'callbacks' => false); $this->Revision->recursive = 0; $this->data['this'] = $this->Revision->find('first', array('conditions' => array('Revision.id' => $id))); - if (!in_array($this->data['this']['Revision']['status'], array('current', 'previous'))) { - $this->Session->setFlash(__('Only current and previous revisions can be viewed', true)); - $this->redirect($this->Session->read('referer')); + if (in_array($this->data['this']['Revision']['status'], array('current', 'previous'))) { + $this->cacheAction = array('duration' => CACHE_DURATION, 'callbacks' => false); + } elseif ($this->Auth->user('id')) { + if (!($this->Auth->user('Level') > COMMENTER || + $this->Auth->user('id') != $this->data['this']['Revision']['user_id'])) { + $this->Session->setFlash(__('Only current and previous revisions can be viewed', true)); + $this->redirect('/'); + } + } else { + $this->Session->setFlash(__('Please login to access this revision', true)); + $this->redirect('/users/login'); } if ($this->data['this']['Revision']['status'] != 'current') { $this->Revision->Node->setLanguage($this->data['this']['Revision']['lang']); diff --git a/docs/install_instructions.txt b/docs/install_instructions.txt index 1ff7fde..5c32e08 100644 --- a/docs/install_instructions.txt +++ b/docs/install_instructions.txt @@ -3,15 +3,24 @@ This app is designed to run with the branch version of 1.2 The user system is linked to the bakery, it's therefore a good idea to have -a working http://cakeforge.org/projects/bakery/ install first. +a working http://cakeforge.org/projects/bakery/ install first. == DB setup == -create the book database and tables using either the schema.php or schema.sql file -Add the sample data from the config/sql folder -if you haven't installed the bakery code, you at least need to create the user -table from the bakery schema +if you have a working bakery install + create the book database and tables using either the schema.php or schema.sql file + create your databse.php file with a default and bakery pointing at + their respective databases +if you don't have or don't want to install the bakery + create an empty database and fill it with the complete.sql file + create your databse.php file with a default and bakery pointing at the + same database == Config setup == Create a core.php file, or copy from a stock 1.2 install Create a database.php file naming the database with a default and bakery connection + +== Creating your initial data == +On first load, the book will populate itself with some test data if the database is empty and debug mode is enabled +Therefore, to start your book experience - create or empty the database and +simply browse \ No newline at end of file diff --git a/index.php b/index.php index 1759394..7a116ce 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: index.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * PHP versions 4 and 5 * @@ -17,9 +16,6 @@ * @package cake * @subpackage cake.app * @since CakePHP v 0.10.0.1076 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ require 'webroot' . DIRECTORY_SEPARATOR . 'index.php'; diff --git a/locale/default.pot b/locale/default.pot index 1a8974b..def9ca5 100644 --- a/locale/default.pot +++ b/locale/default.pot @@ -1,481 +1,520 @@ -# LANGUAGE translation of CakePHP Application -# Copyright YEAR NAME <EMAIL@ADDRESS> +# LANGUAGE translation of Cakebook Application +# Copyright 2008 Andy Dawson <andydawson76@yahoo.co.uk> # Generated from files: -# Revision: 697 /cookbook/app_controller.php -# Revision: 689 /cookbook/controllers/attachments_controller.php -# Revision: 689 /cookbook/controllers/changes_controller.php -# Revision: 702 /cookbook/views/layouts/default.ctp -# Revision: 689 /cookbook/controllers/comments_controller.php -# Revision: 706 /cookbook/views/nodes/view_all.ctp -# Revision: 600 /cookbook/views/comments/index.ctp -# Revision: 704 /cookbook/controllers/nodes_controller.php -# Revision: 698 /cookbook/controllers/revisions_controller.php -# Revision: 701 /cookbook/models/node.php -# Revision: 659 /cookbook/plugins/users/views/users/login.ctp -# Revision: 705 /cookbook/views/elements/secondary_nav.ctp -# Revision: 600 /cookbook/views/changes/index.ctp -# Revision: 638 /cookbook/views/changes/rss/index.ctp -# Revision: 600 /cookbook/views/comments/add.ctp -# Revision: 666 /cookbook/views/elements/attachments.ctp -# Revision: 673 /cookbook/views/elements/comment.ctp -# Revision: 661 /cookbook/views/elements/comment_form.ctp -# Revision: 600 /cookbook/views/elements/login_hint.ctp -# Revision: 705 /cookbook/views/elements/node_options.ctp -# Revision: 673 /cookbook/views/elements/paging.ctp -# Revision: 600 /cookbook/views/elements/search.ctp -# Revision: 672 /cookbook/views/elements/side_menu.ctp -# Revision: 600 /cookbook/views/elements/toc.ctp -# Revision: 673 /cookbook/views/nodes/toc.ctp -# Revision: 600 /cookbook/views/layouts/error.ctp -# Revision: 672 /cookbook/views/nodes/add.ctp -# Revision: 673 /cookbook/views/nodes/edit.ctp -# Revision: 600 /cookbook/views/nodes/admin_merge.ctp -# Revision: 600 /cookbook/views/nodes/history.ctp -# Revision: 706 /cookbook/views/nodes/stats.ctp -# Revision: 707 /cookbook/views/nodes/todo.ctp -# Revision: 673 /cookbook/views/revisions/results.ctp -# Revision: 689 /cookbook/webroot/test.php +# Revision: 697 app_controller.php +# Revision: 689 controllers/attachments_controller.php +# Revision: 689 controllers/changes_controller.php +# Revision: 702 views/layouts/default.ctp +# Revision: 689 controllers/comments_controller.php +# Revision: 706 views/nodes/view_all.ctp +# Revision: 600 views/comments/index.ctp +# Revision: 704 controllers/nodes_controller.php +# Revision: 711 controllers/revisions_controller.php +# Revision: 701 models/node.php +# Revision: 659 plugins/users/views/users/login.ctp +# Revision: 705 views/elements/secondary_nav.ctp +# Revision: 600 views/changes/index.ctp +# Revision: 638 views/changes/rss/index.ctp +# Revision: 600 views/comments/add.ctp +# Revision: 666 views/elements/attachments.ctp +# Revision: 673 views/elements/comment.ctp +# Revision: 661 views/elements/comment_form.ctp +# Revision: 600 views/elements/login_hint.ctp +# Revision: 705 views/elements/node_options.ctp +# Revision: 673 views/elements/paging.ctp +# Revision: 600 views/elements/preview.ctp +# Revision: 600 views/elements/search.ctp +# Revision: 672 views/elements/side_menu.ctp +# Revision: 600 views/elements/toc.ctp +# Revision: 673 views/nodes/toc.ctp +# Revision: 600 views/layouts/error.ctp +# Revision: 672 views/nodes/add.ctp +# Revision: 673 views/nodes/edit.ctp +# Revision: 600 views/nodes/admin_merge.ctp +# Revision: 600 views/nodes/history.ctp +# Revision: 708 views/nodes/stats.ctp +# Revision: 707 views/nodes/todo.ctp +# Revision: 673 views/revisions/results.ctp # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2008-11-19 13:34+0100\n" +"POT-Creation-Date: 2008-12-04 15:20-0200\n" "PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" -"Last-Translator: NAME <EMAIL@ADDRESS>\n" -"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" +"Last-Translator: Andy Dawson <andydawson76@yahoo.co.uk>\n" +"Language-Team:\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +"X-Poedit-Basepath: ../../../\n" -#: /app_controller.php:93 +#: app_controller.php:93 msgid "Whoops, not a valid language." msgstr "" -#: /app_controller.php:109 +#: app_controller.php:109 msgid "Please login to continue" msgstr "" -#: /app_controller.php:293 +#: app_controller.php:293 msgid "All %s matching the term \"%s\"" msgstr "" -#: /controllers/attachments_controller.php:85 +#: controllers/attachments_controller.php:85 msgid "Attachment controller - no class or foreignKey error." msgstr "" -#: /controllers/attachments_controller.php:110 +#: controllers/attachments_controller.php:110 msgid "Existing Attachment for %s, id %s updated" msgstr "" -#: /controllers/attachments_controller.php:112 +#: controllers/attachments_controller.php:112 msgid "New Attachment for %s, id %s added" msgstr "" -#: /controllers/attachments_controller.php:137 +#: controllers/attachments_controller.php:137 msgid "%s with id %s updated" msgstr "" -#: /controllers/attachments_controller.php:140 +#: controllers/attachments_controller.php:140 msgid "errors in form" msgstr "" -#: /controllers/changes_controller.php:130 +#: controllers/changes_controller.php:130 msgid "Recent Changes for %s" msgstr "" -#: /controllers/changes_controller.php:134 -#: /views/layouts/default.ctp:33 +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 msgid "Recent Changes for all languages" msgstr "" -#: /controllers/changes_controller.php:136 -#: /views/layouts/default.ctp:28 +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 msgid "Recent Changes" msgstr "" -#: /controllers/changes_controller.php:144 -#: /controllers/comments_controller.php:191 +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 msgid "by %s" msgstr "" -#: /controllers/changes_controller.php:149 +#: controllers/changes_controller.php:149 msgid "restricted to status: %s" msgstr "" -#: /controllers/comments_controller.php:84;116 +#: controllers/comments_controller.php:84;116 msgid "Invalid Node." msgstr "" -#: /controllers/comments_controller.php:93 +#: controllers/comments_controller.php:93 msgid "Your comment has been added" msgstr "" -#: /controllers/comments_controller.php:96 +#: controllers/comments_controller.php:96 msgid "Please correct errors below." msgstr "" -#: /controllers/comments_controller.php:120 +#: controllers/comments_controller.php:120 msgid "No permissions to see comments for that section" msgstr "" -#: /controllers/comments_controller.php:128 -#: /views/nodes/view_all.ctp:110;120 +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 msgid "Comments for %s" msgstr "" -#: /controllers/comments_controller.php:161 +#: controllers/comments_controller.php:161 msgid "Invalid Comment." msgstr "" -#: /controllers/comments_controller.php:180 -#: /views/comments/index.ctp:6 +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 msgid "Recent Comments" msgstr "" -#: /controllers/comments_controller.php:182 -#: /views/layouts/default.ctp:43 +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 msgid "Recent Comments for all languages" msgstr "" -#: /controllers/nodes_controller.php:846 +#: controllers/nodes_controller.php:848 msgid "Invalid Collection" msgstr "" -#: /controllers/nodes_controller.php:871;976 +#: controllers/nodes_controller.php:873;978 msgid "Thanks for your contribution! Your suggestion has been submitted for review." msgstr "" -#: /controllers/nodes_controller.php:931 +#: controllers/nodes_controller.php:933 msgid "This function is for comparing different (public) language content" msgstr "" -#: /controllers/revisions_controller.php:615;620;643 +#: controllers/revisions_controller.php:616;621;647 msgid "Only current and previous revisions can be viewed" msgstr "" -#: /controllers/revisions_controller.php:624 +#: controllers/revisions_controller.php:625 msgid "Only possible to compare revisions of the same node" msgstr "" -#: /models/node.php:170 +#: controllers/revisions_controller.php:651 +msgid "Please login to access this revision" +msgstr "" + +#: models/node.php:170 msgid "Default Title" msgstr "" -#: /models/node.php:173 +#: models/node.php:173 msgid "default_slug" msgstr "" -#: /models/node.php:176 +#: models/node.php:176 msgid "Default Content" msgstr "" -#: /plugins/users/views/users/login.ctp:8;20 -#: /views/elements/secondary_nav.ctp:23 +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 msgid "Login" msgstr "" -#: /plugins/users/views/users/login.ctp:13 +#: plugins/users/views/users/login.ctp:13 msgid "Forgot your password?" msgstr "" -#: /views/changes/index.ctp:18 +#: views/changes/index.ctp:18 msgid "change submitted by %s, %s" msgstr "" -#: /views/changes/index.ctp:24 -#: /views/changes/rss/index.ctp:14 +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 msgid "accepted" msgstr "" -#: /views/changes/index.ctp:27 -#: /views/changes/rss/index.ctp:17 +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 msgid "not accepted" msgstr "" -#: /views/changes/index.ctp:30 -#: /views/changes/rss/index.ctp:20 +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 msgid "pending" msgstr "" -#: /views/changes/index.ctp:35 +#: views/changes/index.ctp:35 msgid "changed from %s to %s by %s, %s" msgstr "" -#: /views/changes/index.ctp:41 +#: views/changes/index.ctp:41 msgid "submitted by %s" msgstr "" -#: /views/comments/add.ctp:6 +#: views/changes/rss/index.ctp:28 +msgid "Submitted by: %s" +msgstr "" + +#: views/changes/rss/index.ctp:30 +msgid "Changed by: %s" +msgstr "" + +#: views/comments/add.ctp:6 msgid "Comment: %s" msgstr "" -#: /views/comments/index.ctp:4 +#: views/comments/index.ctp:4 msgid "Comments: %s" msgstr "" -#: /views/comments/index.ctp:11 +#: views/comments/index.ctp:11 msgid "No Comments yet!" msgstr "" -#: /views/comments/index.ctp:20 +#: views/comments/index.ctp:20 msgid "This page as a feed" msgstr "" -#: /views/elements/attachments.ctp:2 +#: views/elements/attachments.ctp:2 msgid "Images/Files associated with this content" msgstr "" -#: /views/elements/comment.ctp:9 +#: views/elements/comment.ctp:9 msgid "unknown" msgstr "" -#: /views/elements/comment_form.ctp:4 +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "" + +#: views/elements/comment_form.ctp:4 msgid "Login to add a comment" msgstr "" -#: /views/elements/comment_form.ctp:17 +#: views/elements/comment_form.ctp:17 msgid "Comment on %s" msgstr "" -#: /views/elements/login_hint.ctp:3 +#: views/elements/login_hint.ctp:3 msgid "Login with your Bakery account" msgstr "" -#: /views/elements/login_hint.ctp:4 +#: views/elements/login_hint.ctp:4 msgid "Not got one? Hop on over to %s and sign up" msgstr "" -#: /views/elements/node_options.ctp:8 +#: views/elements/node_options.ctp:8 msgid "Edit" msgstr "" -#: /views/elements/node_options.ctp:11 +#: views/elements/node_options.ctp:11 msgid "View just this section" msgstr "" -#: /views/elements/node_options.ctp:14 +#: views/elements/node_options.ctp:14 msgid "Comments (%s)" msgstr "" -#: /views/elements/node_options.ctp:19 +#: views/elements/node_options.ctp:19 msgid "there is a pending change for this section" msgstr "" -#: /views/elements/node_options.ctp:22 +#: views/elements/node_options.ctp:22 msgid "History" msgstr "" -#: /views/elements/node_options.ctp:32 +#: views/elements/node_options.ctp:32 msgid "This text may be out of sync with the English version" msgstr "" -#: /views/elements/node_options.ctp:39 +#: views/elements/node_options.ctp:39 msgid "Compare to original content" msgstr "" -#: /views/elements/paging.ctp:4 +#: views/elements/paging.ctp:4 msgid "Page %s" msgstr "" -#: /views/elements/paging.ctp:5 +#: views/elements/paging.ctp:5 msgid "<< previous" msgstr "" -#: /views/elements/paging.ctp:8 +#: views/elements/paging.ctp:8 msgid "Next >>" msgstr "" -#: /views/elements/search.ctp:22 -#: /views/elements/search_form.ctp:12 -msgid "Search" +#: views/elements/preview.ctp:6 +msgid "How'd you like them apples?" msgstr "" -#: /views/elements/secondary_nav.ctp:10 -msgid "Top Contributors" +#: views/elements/preview.ctp:7 +msgid "How's that for a slice of fried gold?" +msgstr "" + +#: views/elements/preview.ctp:8 +msgid "How's that for a slice of cake?" +msgstr "" + +#: views/elements/preview.ctp:9 +msgid "Are we done yet?" msgstr "" -#: /views/elements/secondary_nav.ctp:13 -msgid "todo" +#: views/elements/preview.ctp:57 +msgid "Save it" msgstr "" -#: /views/elements/secondary_nav.ctp:17 +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "" + +#: views/elements/secondary_nav.ctp:6 msgid "Logged in as %s" msgstr "" -#: /views/elements/secondary_nav.ctp:18 +#: views/elements/secondary_nav.ctp:7 msgid "Logout" msgstr "" -#: /views/elements/secondary_nav.ctp:26 +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "" + +#: views/elements/secondary_nav.ctp:28 +msgid "Todo" +msgstr "" + +#: views/elements/secondary_nav.ctp:30 msgid "About CakePHP" msgstr "" -#: /views/elements/secondary_nav.ctp:27 +#: views/elements/secondary_nav.ctp:31 msgid "Donate" msgstr "" -#: /views/elements/side_menu.ctp:14 -#: /views/nodes/view_all.ctp:95 +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 msgid "All in one page" msgstr "" -#: /views/elements/side_menu.ctp:23 -#: /views/nodes/view_all.ctp:102 +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 msgid "Suggest a new section here" msgstr "" -#: /views/elements/side_menu.ctp:30 +#: views/elements/side_menu.ctp:30 msgid "Options" msgstr "" -#: /views/elements/toc.ctp:13 -#: /views/nodes/toc.ctp:5 +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 msgid "Table of Contents" msgstr "" -#: /views/elements/toc.ctp:16 +#: views/elements/toc.ctp:16 msgid "see fully expanded table of contents (only)" msgstr "" -#: /views/elements/toc.ctp:19 +#: views/elements/toc.ctp:19 msgid "Books in " msgstr "" -#: /views/elements/toc.ctp:21 +#: views/elements/toc.ctp:21 msgid "Available collections" msgstr "" -#: /views/layouts/default.ctp:38 +#: views/layouts/default.ctp:38 msgid "Recent comments" msgstr "" -#: /views/layouts/default.ctp:51;55 +#: views/layouts/default.ctp:51;55 msgid "My Submissions" msgstr "" -#: /views/layouts/default.ctp:88 +#: views/layouts/default.ctp:88 msgid "Welcome to %s" msgstr "" -#: /views/layouts/error.ctp:6 -msgid "CakePHP: the rapid development php framework:" -msgstr "" - -#: /views/layouts/error.ctp:34 +#: views/layouts/error.ctp:6;34 msgid "CakePHP: the rapid development php framework" msgstr "" -#: /views/nodes/add.ctp:17 -#: /views/nodes/edit.ctp:26 +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." msgstr "" -#: /views/nodes/add.ctp:22 +#: views/nodes/add.ctp:22 msgid "Add a new section" msgstr "" -#: /views/nodes/add.ctp:28 -#: /views/nodes/edit.ctp:32 +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 msgid "Show me a preview before submitting" msgstr "" -#: /views/nodes/add.ctp:30 +#: views/nodes/add.ctp:30 msgid "under" msgstr "" -#: /views/nodes/add.ctp:33 +#: views/nodes/add.ctp:33 msgid "after" msgstr "" -#: /views/nodes/add.ctp:39 -#: /views/nodes/edit.ctp:35 +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" msgstr "" -#: /views/nodes/add.ctp:44 +#: views/nodes/add.ctp:44 msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" msgstr "" -#: /views/nodes/admin_merge.ctp:18 +#: views/nodes/admin_merge.ctp:18 msgid "You are sure? Please check the preview" msgstr "" -#: /views/nodes/compare.ctp:11 -#: /views/revisions/view.ctp:12 +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 msgid "Differences" msgstr "" -#: /views/nodes/edit.ctp:40 +#: views/nodes/edit.ctp:40 msgid "What is the reason for the edit? (In English Please) :)" msgstr "" -#: /views/nodes/history.ctp:6 +#: views/nodes/history.ctp:6 msgid "See English edits too" msgstr "" -#: /views/nodes/stats.ctp:5 +#: views/nodes/stats.ctp:5 msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." msgstr "" -#: /views/nodes/stats.ctp:7;37 +#: views/nodes/stats.ctp:7;37 msgid "Top %s Contributors" msgstr "" -#: /views/nodes/stats.ctp:9;38 +#: views/nodes/stats.ctp:9;38 msgid "Last update: %s" msgstr "" -#: /views/nodes/stats.ctp:27;63 +#: views/nodes/stats.ctp:27;63 msgid "%s (%s current)" msgstr "" -#: /views/nodes/stats.ctp:39 +#: views/nodes/stats.ctp:39 msgid "%s%% translated" msgstr "" -#: /views/nodes/stats.ctp:41 +#: views/nodes/stats.ctp:41 msgid "The cookbook needs you! No submissions for this language!" msgstr "" -#: /views/nodes/stats.ctp:44 +#: views/nodes/stats.ctp:44 msgid "The cookbook needs you! This language will soon be removed if not updated." msgstr "" -#: /views/nodes/stats.ctp:46 +#: views/nodes/stats.ctp:46 msgid "The cookbook needs you! No updates for one month." msgstr "" -#: /views/nodes/todo.ctp:7 +#: views/nodes/todo.ctp:7 +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "" + +#: views/nodes/todo.ctp:10 msgid "These is no <a href=\"%s\">po file</a> for %s" msgstr "" -#: /views/nodes/todo.ctp:9 +#: views/nodes/todo.ctp:13 +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "" + +#: views/nodes/todo.ctp:14 msgid "These sections either do not have a translation, or the English text has changed since it was translated" msgstr "" -#: /views/nodes/view_all.ctp:40;67 +#: views/nodes/view_all.ctp:40;67 msgid "See comments for this section" msgstr "" -#: /views/nodes/view_all.ctp:114;126 +#: views/nodes/view_all.ctp:114;126 msgid "Change history for %s" msgstr "" -#: /views/revisions/results.ctp:8 +#: views/revisions/results.ctp:8 msgid "Search Results" msgstr "" -#: /views/revisions/results.ctp:32 +#: views/revisions/results.ctp:32 msgid "No results" msgstr "" -#: /views/revisions/search.ctp:1 +#: views/revisions/search.ctp:1 msgid "Search book.cakephp.org" msgstr "" - -#: /webroot/test.php:75 -msgid "Debug setting does not allow access to this url." -msgstr "" - diff --git a/locale/dut/LC_MESSAGES/default.po b/locale/dut/LC_MESSAGES/default.po new file mode 100644 index 0000000..a619313 --- /dev/null +++ b/locale/dut/LC_MESSAGES/default.po @@ -0,0 +1,527 @@ +# LANGUAGE translation of CakePHP Application +# Copyright YEAR NAME <EMAIL@ADDRESS> +# Generated from files: +# Revision: 697 /cookbook/app_controller.php +# Revision: 689 /cookbook/controllers/attachments_controller.php +# Revision: 689 /cookbook/controllers/changes_controller.php +# Revision: 702 /cookbook/views/layouts/default.ctp +# Revision: 689 /cookbook/controllers/comments_controller.php +# Revision: 706 /cookbook/views/nodes/view_all.ctp +# Revision: 600 /cookbook/views/comments/index.ctp +# Revision: 704 /cookbook/controllers/nodes_controller.php +# Revision: 698 /cookbook/controllers/revisions_controller.php +# Revision: 701 /cookbook/models/node.php +# Revision: 659 /cookbook/plugins/users/views/users/login.ctp +# Revision: 705 /cookbook/views/elements/secondary_nav.ctp +# Revision: 600 /cookbook/views/changes/index.ctp +# Revision: 638 /cookbook/views/changes/rss/index.ctp +# Revision: 600 /cookbook/views/comments/add.ctp +# Revision: 666 /cookbook/views/elements/attachments.ctp +# Revision: 673 /cookbook/views/elements/comment.ctp +# Revision: 661 /cookbook/views/elements/comment_form.ctp +# Revision: 600 /cookbook/views/elements/login_hint.ctp +# Revision: 705 /cookbook/views/elements/node_options.ctp +# Revision: 673 /cookbook/views/elements/paging.ctp +# Revision: 600 /cookbook/views/elements/search.ctp +# Revision: 672 /cookbook/views/elements/side_menu.ctp +# Revision: 600 /cookbook/views/elements/toc.ctp +# Revision: 673 /cookbook/views/nodes/toc.ctp +# Revision: 600 /cookbook/views/layouts/error.ctp +# Revision: 672 /cookbook/views/nodes/add.ctp +# Revision: 673 /cookbook/views/nodes/edit.ctp +# Revision: 600 /cookbook/views/nodes/admin_merge.ctp +# Revision: 600 /cookbook/views/nodes/history.ctp +# Revision: 706 /cookbook/views/nodes/stats.ctp +# Revision: 707 /cookbook/views/nodes/todo.ctp +# Revision: 673 /cookbook/views/revisions/results.ctp +# Revision: 689 /cookbook/webroot/test.php +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2008-12-04 15:20-0200\n" +"PO-Revision-Date: 2008-12-09 14:37-0300\n" +"Last-Translator: Renan Gonçalves <renan.saddam@gmail.com>\n" +"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: app_controller.php:93 +msgid "Whoops, not a valid language." +msgstr "Oeps, geen geldige taal" + +#: app_controller.php:109 +msgid "Please login to continue" +msgstr "Meld je aan om door te gaan" + +#: app_controller.php:293 +msgid "All %s matching the term \"%s\"" +msgstr "Alle %s die matchen met \"%s\"" + +#: controllers/attachments_controller.php:85 +msgid "Attachment controller - no class or foreignKey error." +msgstr "Attachment controller - geen klasse of foreignKey is onjuist " + +#: controllers/attachments_controller.php:110 +msgid "Existing Attachment for %s, id %s updated" +msgstr "Bestaande bijlage voor %s, id %s is gewijzigd" + +#: controllers/attachments_controller.php:112 +msgid "New Attachment for %s, id %s added" +msgstr "Nieuwe bijlage voor %s, id %s is toegevoegd" + +#: controllers/attachments_controller.php:137 +msgid "%s with id %s updated" +msgstr "%s met id %s is gewijzigd" + +#: controllers/attachments_controller.php:140 +msgid "errors in form" +msgstr "fouten in het formulier" + +#: controllers/changes_controller.php:130 +msgid "Recent Changes for %s" +msgstr "Recente wijzigingen van %s" + +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 +msgid "Recent Changes for all languages" +msgstr "Recente wijzigingen ( alle talen )" + +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 +msgid "Recent Changes" +msgstr "Recente wijzigingen" + +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 +msgid "by %s" +msgstr "door %s" + +#: controllers/changes_controller.php:149 +msgid "restricted to status: %s" +msgstr "alleen beschikbaar voor: %s" + +#: controllers/comments_controller.php:84;116 +msgid "Invalid Node." +msgstr "Ongeldig item." + +#: controllers/comments_controller.php:93 +msgid "Your comment has been added" +msgstr "De opmerking is toegevoegd" + +#: controllers/comments_controller.php:96 +msgid "Please correct errors below." +msgstr "Er zijn fouten opgetreden in invoer. Corrigeer a.u.b. de onderstaande fouten." + +#: controllers/comments_controller.php:120 +msgid "No permissions to see comments for that section" +msgstr "Je beschikt niet over voldoende rechten om de opmerkingen bij deze sectie te zien." + +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 +msgid "Comments for %s" +msgstr "Opmerkingen bij %s" + +#: controllers/comments_controller.php:161 +msgid "Invalid Comment." +msgstr "Ongeldig bericht." + +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 +msgid "Recent Comments" +msgstr "Recente berichten" + +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 +msgid "Recent Comments for all languages" +msgstr "Recente berichten ( alle talen )" + +#: controllers/nodes_controller.php:848 +msgid "Invalid Collection" +msgstr "Ongeldige verzameling" + +#: controllers/nodes_controller.php:873;978 +msgid "Thanks for your contribution! Your suggestion has been submitted for review." +msgstr "Bedankt voor je inzending! Je werk is ingediend en zal beoordeeld worden." + +#: controllers/nodes_controller.php:933 +msgid "This function is for comparing different (public) language content" +msgstr "Met deze functionaliteit kan publiekelijke content uit verschillende talen met elkaar vergeleken worden." + +#: controllers/revisions_controller.php:616;621;647 +msgid "Only current and previous revisions can be viewed" +msgstr "Alleen de huidige en oudere versies kunnen bekeken worden" + +#: controllers/revisions_controller.php:625 +msgid "Only possible to compare revisions of the same node" +msgstr "Het is alleen mogelijk om versies te vergelijken van hetzelfde item" + +#: controllers/revisions_controller.php:651 +#, fuzzy +msgid "Please login to access this revision" +msgstr "Meld je aan om door te gaan" + +#: models/node.php:170 +msgid "Default Title" +msgstr "Standaard titel" + +#: models/node.php:173 +msgid "default_slug" +msgstr "" + +#: models/node.php:176 +msgid "Default Content" +msgstr "Standaard tekst" + +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 +msgid "Login" +msgstr "Aanmelden" + +#: plugins/users/views/users/login.ctp:13 +msgid "Forgot your password?" +msgstr "Wachtwoord vergeten?" + +#: views/changes/index.ctp:18 +msgid "change submitted by %s, %s" +msgstr "wijziging ingestuurd door %s, %s" + +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 +msgid "accepted" +msgstr "geaccepteerd" + +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 +msgid "not accepted" +msgstr "niet geaccepteerd" + +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 +msgid "pending" +msgstr "in behandeling" + +#: views/changes/index.ctp:35 +msgid "changed from %s to %s by %s, %s" +msgstr "gewijzigd van %s naar %s door %s, %s" + +#: views/changes/index.ctp:41 +msgid "submitted by %s" +msgstr "ingediend door %s" + +#: views/changes/rss/index.ctp:28 +#, fuzzy +msgid "Submitted by: %s" +msgstr "ingediend door %s" + +#: views/changes/rss/index.ctp:30 +#, fuzzy +msgid "Changed by: %s" +msgstr "Geschiedenis van wijzigingen voor %s" + +#: views/comments/add.ctp:6 +msgid "Comment: %s" +msgstr "Commentaar: %s" + +#: views/comments/index.ctp:4 +msgid "Comments: %s" +msgstr "Commentaar: %s" + +#: views/comments/index.ctp:11 +msgid "No Comments yet!" +msgstr "Er is nog geen commentaar toegevoegd!" + +#: views/comments/index.ctp:20 +msgid "This page as a feed" +msgstr "Deze pagina heeft een feed" + +#: views/elements/attachments.ctp:2 +msgid "Images/Files associated with this content" +msgstr "Afbeeldingen/Bestanden geassocieerd met dit item" + +#: views/elements/comment.ctp:9 +msgid "unknown" +msgstr "onbekend" + +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "door %s %s" + +#: views/elements/comment_form.ctp:4 +msgid "Login to add a comment" +msgstr "Meld je aan om commentaar toe te voegen" + +#: views/elements/comment_form.ctp:17 +msgid "Comment on %s" +msgstr "Commentaar op %s" + +#: views/elements/login_hint.ctp:3 +msgid "Login with your Bakery account" +msgstr "Meld je aan met je Bakery account" + +#: views/elements/login_hint.ctp:4 +msgid "Not got one? Hop on over to %s and sign up" +msgstr "Nog een account? Ga naar %s om je te registreren" + +#: views/elements/node_options.ctp:8 +msgid "Edit" +msgstr "Wijzigen" + +#: views/elements/node_options.ctp:11 +msgid "View just this section" +msgstr "Bekijk alleen deze rubriek" + +#: views/elements/node_options.ctp:14 +msgid "Comments (%s)" +msgstr "Commentaar (%s)" + +#: views/elements/node_options.ctp:19 +msgid "there is a pending change for this section" +msgstr "er is al een wijziging in behandeling voor dit item" + +#: views/elements/node_options.ctp:22 +msgid "History" +msgstr "Geschiedenis" + +#: views/elements/node_options.ctp:32 +msgid "This text may be out of sync with the English version" +msgstr "Het is mogelijk dat deze tekst achterloopt op de Engelse documentatie" + +#: views/elements/node_options.ctp:39 +msgid "Compare to original content" +msgstr "Vergelijk met de orginele inhoud" + +#: views/elements/paging.ctp:4 +msgid "Page %s" +msgstr "Pagina %s" + +#: views/elements/paging.ctp:5 +msgid "<< previous" +msgstr "<< vorige" + +#: views/elements/paging.ctp:8 +msgid "Next >>" +msgstr "Volgende >>" + +#: views/elements/preview.ctp:6 +msgid "How'd you like them apples?" +msgstr "" + +#: views/elements/preview.ctp:7 +msgid "How's that for a slice of fried gold?" +msgstr "" + +#: views/elements/preview.ctp:8 +msgid "How's that for a slice of cake?" +msgstr "" + +#: views/elements/preview.ctp:9 +msgid "Are we done yet?" +msgstr "" + +#: views/elements/preview.ctp:57 +msgid "Save it" +msgstr "" + +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "Zoeken" + +#: views/elements/secondary_nav.ctp:6 +msgid "Logged in as %s" +msgstr "Aangemeld als %s" + +#: views/elements/secondary_nav.ctp:7 +msgid "Logout" +msgstr "Afmelden" + +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "Top inzenders " + +#: views/elements/secondary_nav.ctp:28 +msgid "Todo" +msgstr "nog te doen" + +#: views/elements/secondary_nav.ctp:30 +msgid "About CakePHP" +msgstr "Over CakePHP" + +#: views/elements/secondary_nav.ctp:31 +msgid "Donate" +msgstr "Doneren" + +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 +msgid "All in one page" +msgstr "Alles op 1 pagina" + +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 +msgid "Suggest a new section here" +msgstr "Een nieuwe rubriek hier" + +#: views/elements/side_menu.ctp:30 +msgid "Options" +msgstr "Opties" + +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 +msgid "Table of Contents" +msgstr "Inhoudsopgave" + +#: views/elements/toc.ctp:16 +msgid "see fully expanded table of contents (only)" +msgstr "bekijk de volledige inhoudsopgave" + +#: views/elements/toc.ctp:19 +msgid "Books in " +msgstr "Boeken over " + +#: views/elements/toc.ctp:21 +msgid "Available collections" +msgstr "Beschikbare verzamelingen" + +#: views/layouts/default.ctp:38 +msgid "Recent comments" +msgstr "Recente berichten" + +#: views/layouts/default.ctp:51;55 +msgid "My Submissions" +msgstr "Mijn inzendingen" + +#: views/layouts/default.ctp:88 +msgid "Welcome to %s" +msgstr "Welkom bij %s" + +#: views/layouts/error.ctp:6;34 +msgid "CakePHP: the rapid development php framework" +msgstr "" + +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 +msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." +msgstr "Zorg er voor dat je de richtlijnen hebt gelezen om consistentie te garanderen onder de artikelen." + +#: views/nodes/add.ctp:22 +msgid "Add a new section" +msgstr "Nieuwe rubiek toevoegen" + +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 +msgid "Show me a preview before submitting" +msgstr "Toon mij eerst een voorbeeld voordat de tekst ingezonden wordt" + +#: views/nodes/add.ctp:30 +msgid "under" +msgstr "onder" + +#: views/nodes/add.ctp:33 +msgid "after" +msgstr "na" + +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 +msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" +msgstr "Inhoud. Gebruik de pre tag voor code. Inzendingen zonder html formateerde tekst zal automatisch geformateerd worden" + +#: views/nodes/add.ctp:44 +msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" +msgstr "Wat is de reden voor jouw wijziging? ( In het Engels )" + +#: views/nodes/admin_merge.ctp:18 +msgid "You are sure? Please check the preview" +msgstr "Ben je klaar? Controleer het voorbeeld" + +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 +msgid "Differences" +msgstr "Verschillen" + +#: views/nodes/edit.ctp:40 +msgid "What is the reason for the edit? (In English Please) :)" +msgstr "Wat is de reden voor de wijziging? ( in het Engels )" + +#: views/nodes/history.ctp:6 +msgid "See English edits too" +msgstr "Geef ook de wijzigingen aan Engelse artikelen weer" + +#: views/nodes/stats.ctp:5 +msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." +msgstr "Alle mensen die tijd hebben gevonden om te schrijven voor deze handleiding, Bedankt!" + +#: views/nodes/stats.ctp:7;37 +msgid "Top %s Contributors" +msgstr "Top %s inzendingen" + +#: views/nodes/stats.ctp:9;38 +msgid "Last update: %s" +msgstr "Laatste update: %s" + +#: views/nodes/stats.ctp:27;63 +msgid "%s (%s current)" +msgstr "%s (%s huidig)" + +#: views/nodes/stats.ctp:39 +msgid "%s%% translated" +msgstr "%s%% vertaald" + +#: views/nodes/stats.ctp:41 +msgid "The cookbook needs you! No submissions for this language!" +msgstr "Het cookbook heeft jou nodig! Er zijn nog geen inzendingen voor deze taal!" + +#: views/nodes/stats.ctp:44 +msgid "The cookbook needs you! This language will soon be removed if not updated." +msgstr "Het cookbook heeft jou nodig! Deze taal zal verwijderd worden wanneer er geen nieuwe inzendingen komen." + +#: views/nodes/stats.ctp:46 +msgid "The cookbook needs you! No updates for one month." +msgstr "Het cookbook heeft jou nodig! Deze taal heeft meer dan een maand geen inzendingen gehad." + +#: views/nodes/todo.ctp:7 +#, fuzzy +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "Er is geen <a href=\"%s\">po bestand</avoor %s" + +#: views/nodes/todo.ctp:10 +msgid "These is no <a href=\"%s\">po file</a> for %s" +msgstr "Er is geen <a href=\"%s\">po bestand</avoor %s" + +#: views/nodes/todo.ctp:13 +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "" + +#: views/nodes/todo.ctp:14 +msgid "These sections either do not have a translation, or the English text has changed since it was translated" +msgstr "Deze rubrieken zijn nog niet vertaald of de Engelse tekst is gewijzigd sinds de laatste wijziging aan de rubiek." + +#: views/nodes/view_all.ctp:40;67 +msgid "See comments for this section" +msgstr "Bekijk het commentaar van gebruikers bij deze rubriek" + +#: views/nodes/view_all.ctp:114;126 +msgid "Change history for %s" +msgstr "Geschiedenis van wijzigingen voor %s" + +#: views/revisions/results.ctp:8 +msgid "Search Results" +msgstr "Zoekresultaten" + +#: views/revisions/results.ctp:32 +msgid "No results" +msgstr "Geen resultaten" + +#: views/revisions/search.ctp:1 +msgid "Search book.cakephp.org" +msgstr "Doorzoek book.cakephp.org" + +#~ msgid "Debug setting does not allow access to this url." +#~ msgstr "De huidige debug configuratie geeft geen toegang tot deze url." + diff --git a/locale/eng/LC_MESSAGES/default.po b/locale/eng/LC_MESSAGES/default.po index 4dbbb8b..6bdeb48 100644 --- a/locale/eng/LC_MESSAGES/default.po +++ b/locale/eng/LC_MESSAGES/default.po @@ -1,441 +1,485 @@ msgid "" msgstr "" "Project-Id-Version: Cookbook 1.0\n" -"POT-Creation-Date: 2008-11-19 13:34+0100\n" -"PO-Revision-Date: 2008-11-19 13:52+0100\n" -"Last-Translator: Andy Dawson <andydawson76@yahoo.co.uk>\n" +"POT-Creation-Date: 2008-12-04 15:20-0200\n" +"PO-Revision-Date: 2008-12-09 14:37-0300\n" +"Last-Translator: Renan Gonçalves <renan.saddam@gmail.com>\n" "Language-Team: Documentation CakePHP <docs@cakephp.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Basepath: ../../../\n" -#: /app_controller.php:93 +#: app_controller.php:93 msgid "Whoops, not a valid language." msgstr "" -#: /app_controller.php:109 +#: app_controller.php:109 msgid "Please login to continue" msgstr "" -#: /app_controller.php:293 +#: app_controller.php:293 msgid "All %s matching the term \"%s\"" msgstr "" -#: /controllers/attachments_controller.php:85 +#: controllers/attachments_controller.php:85 msgid "Attachment controller - no class or foreignKey error." msgstr "" -#: /controllers/attachments_controller.php:110 +#: controllers/attachments_controller.php:110 msgid "Existing Attachment for %s, id %s updated" msgstr "" -#: /controllers/attachments_controller.php:112 +#: controllers/attachments_controller.php:112 msgid "New Attachment for %s, id %s added" msgstr "" -#: /controllers/attachments_controller.php:137 +#: controllers/attachments_controller.php:137 msgid "%s with id %s updated" -msgstr "%s with id %s updated" +msgstr "" -#: /controllers/attachments_controller.php:140 +#: controllers/attachments_controller.php:140 msgid "errors in form" msgstr "" -#: /controllers/changes_controller.php:130 +#: controllers/changes_controller.php:130 msgid "Recent Changes for %s" msgstr "" -#: /controllers/changes_controller.php:134 -#: /views/layouts/default.ctp:33 +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 msgid "Recent Changes for all languages" msgstr "" -#: /controllers/changes_controller.php:136 -#: /views/layouts/default.ctp:28 +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 msgid "Recent Changes" msgstr "" -#: /controllers/changes_controller.php:144 -#: /controllers/comments_controller.php:191 +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 msgid "by %s" msgstr "" -#: /controllers/changes_controller.php:149 +#: controllers/changes_controller.php:149 msgid "restricted to status: %s" msgstr "" -#: /controllers/comments_controller.php:84;116 +#: controllers/comments_controller.php:84;116 msgid "Invalid Node." msgstr "" -#: /controllers/comments_controller.php:93 +#: controllers/comments_controller.php:93 msgid "Your comment has been added" msgstr "" -#: /controllers/comments_controller.php:96 +#: controllers/comments_controller.php:96 msgid "Please correct errors below." msgstr "" -#: /controllers/comments_controller.php:120 +#: controllers/comments_controller.php:120 msgid "No permissions to see comments for that section" msgstr "" -#: /controllers/comments_controller.php:128 -#: /views/nodes/view_all.ctp:110;120 +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 msgid "Comments for %s" msgstr "" -#: /controllers/comments_controller.php:161 +#: controllers/comments_controller.php:161 msgid "Invalid Comment." msgstr "" -#: /controllers/comments_controller.php:180 -#: /views/comments/index.ctp:6 +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 msgid "Recent Comments" msgstr "" -#: /controllers/comments_controller.php:182 -#: /views/layouts/default.ctp:43 +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 msgid "Recent Comments for all languages" msgstr "" -#: /controllers/nodes_controller.php:846 +#: controllers/nodes_controller.php:848 msgid "Invalid Collection" msgstr "" -#: /controllers/nodes_controller.php:871;976 +#: controllers/nodes_controller.php:873;978 msgid "Thanks for your contribution! Your suggestion has been submitted for review." msgstr "" -#: /controllers/nodes_controller.php:931 +#: controllers/nodes_controller.php:933 msgid "This function is for comparing different (public) language content" msgstr "" -#: /controllers/revisions_controller.php:615;620;643 +#: controllers/revisions_controller.php:616;621;647 msgid "Only current and previous revisions can be viewed" msgstr "" -#: /controllers/revisions_controller.php:624 +#: controllers/revisions_controller.php:625 msgid "Only possible to compare revisions of the same node" msgstr "" -#: /models/node.php:170 +#: controllers/revisions_controller.php:651 +msgid "Please login to access this revision" +msgstr "" + +#: models/node.php:170 msgid "Default Title" msgstr "This section has yet to be written" -#: /models/node.php:173 +#: models/node.php:173 msgid "default_slug" msgstr "missing" -#: /models/node.php:176 +#: models/node.php:176 msgid "Default Content" msgstr "<p>This section has yet to be written, if you have an idea of what to put here please use the links and let us know your suggestion!</p>" -#: /plugins/users/views/users/login.ctp:8;20 -#: /views/elements/secondary_nav.ctp:23 +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 msgid "Login" msgstr "" -#: /plugins/users/views/users/login.ctp:13 +#: plugins/users/views/users/login.ctp:13 msgid "Forgot your password?" msgstr "" -#: /views/changes/index.ctp:18 +#: views/changes/index.ctp:18 msgid "change submitted by %s, %s" msgstr "" -#: /views/changes/index.ctp:24 -#: /views/changes/rss/index.ctp:14 +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 msgid "accepted" msgstr "" -#: /views/changes/index.ctp:27 -#: /views/changes/rss/index.ctp:17 +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 msgid "not accepted" msgstr "" -#: /views/changes/index.ctp:30 -#: /views/changes/rss/index.ctp:20 +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 msgid "pending" msgstr "" -#: /views/changes/index.ctp:35 +#: views/changes/index.ctp:35 msgid "changed from %s to %s by %s, %s" msgstr "" -#: /views/changes/index.ctp:41 +#: views/changes/index.ctp:41 msgid "submitted by %s" msgstr "" -#: /views/comments/add.ctp:6 +#: views/changes/rss/index.ctp:28 +msgid "Submitted by: %s" +msgstr "" + +#: views/changes/rss/index.ctp:30 +msgid "Changed by: %s" +msgstr "" + +#: views/comments/add.ctp:6 msgid "Comment: %s" msgstr "" -#: /views/comments/index.ctp:4 +#: views/comments/index.ctp:4 msgid "Comments: %s" msgstr "" -#: /views/comments/index.ctp:11 +#: views/comments/index.ctp:11 msgid "No Comments yet!" msgstr "" -#: /views/comments/index.ctp:20 +#: views/comments/index.ctp:20 msgid "This page as a feed" msgstr "" -#: /views/elements/attachments.ctp:2 +#: views/elements/attachments.ctp:2 msgid "Images/Files associated with this content" msgstr "" -#: /views/elements/comment.ctp:9 +#: views/elements/comment.ctp:9 msgid "unknown" msgstr "" -#: /views/elements/comment_form.ctp:4 +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "" + +#: views/elements/comment_form.ctp:4 msgid "Login to add a comment" msgstr "" -#: /views/elements/comment_form.ctp:17 +#: views/elements/comment_form.ctp:17 msgid "Comment on %s" msgstr "" -#: /views/elements/login_hint.ctp:3 +#: views/elements/login_hint.ctp:3 msgid "Login with your Bakery account" msgstr "" -#: /views/elements/login_hint.ctp:4 +#: views/elements/login_hint.ctp:4 msgid "Not got one? Hop on over to %s and sign up" msgstr "" -#: /views/elements/node_options.ctp:8 +#: views/elements/node_options.ctp:8 msgid "Edit" msgstr "" -#: /views/elements/node_options.ctp:11 +#: views/elements/node_options.ctp:11 msgid "View just this section" msgstr "" -#: /views/elements/node_options.ctp:14 +#: views/elements/node_options.ctp:14 msgid "Comments (%s)" msgstr "" -#: /views/elements/node_options.ctp:19 +#: views/elements/node_options.ctp:19 msgid "there is a pending change for this section" msgstr "" -#: /views/elements/node_options.ctp:22 +#: views/elements/node_options.ctp:22 msgid "History" msgstr "" -#: /views/elements/node_options.ctp:32 +#: views/elements/node_options.ctp:32 msgid "This text may be out of sync with the English version" msgstr "" -#: /views/elements/node_options.ctp:39 +#: views/elements/node_options.ctp:39 msgid "Compare to original content" msgstr "" -#: /views/elements/paging.ctp:4 +#: views/elements/paging.ctp:4 msgid "Page %s" msgstr "" -#: /views/elements/paging.ctp:5 +#: views/elements/paging.ctp:5 msgid "<< previous" msgstr "" -#: /views/elements/paging.ctp:8 +#: views/elements/paging.ctp:8 msgid "Next >>" msgstr "" -#: /views/elements/search.ctp:22 -#: /views/elements/search_form.ctp:12 -msgid "Search" +#: views/elements/preview.ctp:6 +msgid "How'd you like them apples?" msgstr "" -#: /views/elements/secondary_nav.ctp:10 -msgid "Top Contributors" +#: views/elements/preview.ctp:7 +msgid "How's that for a slice of fried gold?" +msgstr "" + +#: views/elements/preview.ctp:8 +msgid "How's that for a slice of cake?" msgstr "" -#: /views/elements/secondary_nav.ctp:13 -msgid "todo" +#: views/elements/preview.ctp:9 +msgid "Are we done yet?" msgstr "" -#: /views/elements/secondary_nav.ctp:17 +#: views/elements/preview.ctp:57 +msgid "Save it" +msgstr "" + +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "" + +#: views/elements/secondary_nav.ctp:6 msgid "Logged in as %s" msgstr "" -#: /views/elements/secondary_nav.ctp:18 +#: views/elements/secondary_nav.ctp:7 msgid "Logout" msgstr "" -#: /views/elements/secondary_nav.ctp:26 +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "" + +#: views/elements/secondary_nav.ctp:28 +msgid "Todo" +msgstr "" + +#: views/elements/secondary_nav.ctp:30 msgid "About CakePHP" msgstr "" -#: /views/elements/secondary_nav.ctp:27 +#: views/elements/secondary_nav.ctp:31 msgid "Donate" msgstr "" -#: /views/elements/side_menu.ctp:14 -#: /views/nodes/view_all.ctp:95 +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 msgid "All in one page" msgstr "" -#: /views/elements/side_menu.ctp:23 -#: /views/nodes/view_all.ctp:102 +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 msgid "Suggest a new section here" msgstr "" -#: /views/elements/side_menu.ctp:30 +#: views/elements/side_menu.ctp:30 msgid "Options" msgstr "" -#: /views/elements/toc.ctp:13 -#: /views/nodes/toc.ctp:5 +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 msgid "Table of Contents" msgstr "Table of Contents" -#: /views/elements/toc.ctp:16 +#: views/elements/toc.ctp:16 msgid "see fully expanded table of contents (only)" msgstr "" -#: /views/elements/toc.ctp:19 +#: views/elements/toc.ctp:19 msgid "Books in " msgstr "" -#: /views/elements/toc.ctp:21 +#: views/elements/toc.ctp:21 msgid "Available collections" msgstr "" -#: /views/layouts/default.ctp:38 +#: views/layouts/default.ctp:38 msgid "Recent comments" msgstr "" -#: /views/layouts/default.ctp:51;55 +#: views/layouts/default.ctp:51;55 msgid "My Submissions" msgstr "" -#: /views/layouts/default.ctp:88 +#: views/layouts/default.ctp:88 msgid "Welcome to %s" msgstr "" -#: /views/layouts/error.ctp:6 -msgid "CakePHP: the rapid development php framework:" -msgstr "" - -#: /views/layouts/error.ctp:34 +#: views/layouts/error.ctp:6;34 msgid "CakePHP: the rapid development php framework" msgstr "" -#: /views/nodes/add.ctp:17 -#: /views/nodes/edit.ctp:26 +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." msgstr "" -#: /views/nodes/add.ctp:22 +#: views/nodes/add.ctp:22 msgid "Add a new section" msgstr "" -#: /views/nodes/add.ctp:28 -#: /views/nodes/edit.ctp:32 +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 msgid "Show me a preview before submitting" msgstr "" -#: /views/nodes/add.ctp:30 +#: views/nodes/add.ctp:30 msgid "under" msgstr "" -#: /views/nodes/add.ctp:33 +#: views/nodes/add.ctp:33 msgid "after" msgstr "" -#: /views/nodes/add.ctp:39 -#: /views/nodes/edit.ctp:35 +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" msgstr "" -#: /views/nodes/add.ctp:44 +#: views/nodes/add.ctp:44 msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" msgstr "" -#: /views/nodes/admin_merge.ctp:18 +#: views/nodes/admin_merge.ctp:18 msgid "You are sure? Please check the preview" msgstr "" -#: /views/nodes/compare.ctp:11 -#: /views/revisions/view.ctp:12 +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 msgid "Differences" msgstr "" -#: /views/nodes/edit.ctp:40 +#: views/nodes/edit.ctp:40 msgid "What is the reason for the edit? (In English Please) :)" msgstr "" -#: /views/nodes/history.ctp:6 +#: views/nodes/history.ctp:6 msgid "See English edits too" msgstr "" -#: /views/nodes/stats.ctp:5 +#: views/nodes/stats.ctp:5 msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." msgstr "" -#: /views/nodes/stats.ctp:7;37 +#: views/nodes/stats.ctp:7;37 msgid "Top %s Contributors" msgstr "" -#: /views/nodes/stats.ctp:9;38 +#: views/nodes/stats.ctp:9;38 msgid "Last update: %s" msgstr "" -#: /views/nodes/stats.ctp:27;63 +#: views/nodes/stats.ctp:27;63 msgid "%s (%s current)" msgstr "" -#: /views/nodes/stats.ctp:39 +#: views/nodes/stats.ctp:39 msgid "%s%% translated" msgstr "" -#: /views/nodes/stats.ctp:41 +#: views/nodes/stats.ctp:41 msgid "The cookbook needs you! No submissions for this language!" msgstr "" -#: /views/nodes/stats.ctp:44 +#: views/nodes/stats.ctp:44 msgid "The cookbook needs you! This language will soon be removed if not updated." msgstr "" -#: /views/nodes/stats.ctp:46 +#: views/nodes/stats.ctp:46 msgid "The cookbook needs you! No updates for one month." msgstr "" -#: /views/nodes/todo.ctp:7 +#: views/nodes/todo.ctp:7 +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "" + +#: views/nodes/todo.ctp:10 msgid "These is no <a href=\"%s\">po file</a> for %s" msgstr "" -#: /views/nodes/todo.ctp:9 +#: views/nodes/todo.ctp:13 +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "" + +#: views/nodes/todo.ctp:14 msgid "These sections either do not have a translation, or the English text has changed since it was translated" msgstr "" -#: /views/nodes/view_all.ctp:40;67 +#: views/nodes/view_all.ctp:40;67 msgid "See comments for this section" msgstr "" -#: /views/nodes/view_all.ctp:114;126 +#: views/nodes/view_all.ctp:114;126 msgid "Change history for %s" msgstr "" -#: /views/revisions/results.ctp:8 +#: views/revisions/results.ctp:8 msgid "Search Results" msgstr "" -#: /views/revisions/results.ctp:32 +#: views/revisions/results.ctp:32 msgid "No results" msgstr "" -#: /views/revisions/search.ctp:1 +#: views/revisions/search.ctp:1 msgid "Search book.cakephp.org" msgstr "Search book.cakephp.org" -#: /webroot/test.php:75 -msgid "Debug setting does not allow access to this url." -msgstr "Debug setting does not allow access to this url." +#~ msgid "Debug setting does not allow access to this url." +#~ msgstr "Debug setting does not allow access to this url." diff --git a/locale/eng/LC_MESSAGES/empty b/locale/eng/LC_MESSAGES/empty deleted file mode 100644 index e69de29..0000000 diff --git a/locale/fre/LC_MESSAGES/default.po b/locale/fre/LC_MESSAGES/default.po index 7399a33..b21da64 100644 --- a/locale/fre/LC_MESSAGES/default.po +++ b/locale/fre/LC_MESSAGES/default.po @@ -28,443 +28,490 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2008-11-19 13:34+0100\n" -"PO-Revision-Date: 2008-11-19 13:36+0100\n" -"Last-Translator: Andy Dawson <andydawson76@yahoo.co.uk>\n" +"POT-Creation-Date: 2008-12-04 15:20-0200\n" +"PO-Revision-Date: 2008-12-09 14:37-0300\n" +"Last-Translator: Renan Gonçalves <renan.saddam@gmail.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Basepath: ../../../\n" -#: /app_controller.php:93 +#: app_controller.php:93 msgid "Whoops, not a valid language." msgstr "Oups, ce n'est pas une langue valide." -#: /app_controller.php:109 +#: app_controller.php:109 msgid "Please login to continue" msgstr "Merci de vous identifier pour continuer" -#: /app_controller.php:293 +#: app_controller.php:293 msgid "All %s matching the term \"%s\"" msgstr "Tous %s valident le terme \"%s\"" -#: /controllers/attachments_controller.php:85 +#: controllers/attachments_controller.php:85 msgid "Attachment controller - no class or foreignKey error." msgstr "Liaison du contrôleur - pas de classe ou erreur de clé étrangère" -#: /controllers/attachments_controller.php:110 +#: controllers/attachments_controller.php:110 msgid "Existing Attachment for %s, id %s updated" msgstr "Nouvelle liaison pour %s, l'id %s est ajouté" -#: /controllers/attachments_controller.php:112 +#: controllers/attachments_controller.php:112 msgid "New Attachment for %s, id %s added" msgstr "Nouvelle liaison pour %s, l'id %s est ajouté" -#: /controllers/attachments_controller.php:137 +#: controllers/attachments_controller.php:137 msgid "%s with id %s updated" msgstr "%s avec l'identifiant %s est mis à jour" -#: /controllers/attachments_controller.php:140 +#: controllers/attachments_controller.php:140 msgid "errors in form" msgstr "erreurs dans le formulaire" -#: /controllers/changes_controller.php:130 +#: controllers/changes_controller.php:130 msgid "Recent Changes for %s" msgstr "Modifications récentes pour %s" -#: /controllers/changes_controller.php:134 -#: /views/layouts/default.ctp:33 +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 msgid "Recent Changes for all languages" msgstr "Modifications récentes pour toutes les langues" -#: /controllers/changes_controller.php:136 -#: /views/layouts/default.ctp:28 +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 msgid "Recent Changes" msgstr "Modifications récentes" -#: /controllers/changes_controller.php:144 -#: /controllers/comments_controller.php:191 +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 msgid "by %s" msgstr "par %s" -#: /controllers/changes_controller.php:149 +#: controllers/changes_controller.php:149 msgid "restricted to status: %s" msgstr "réservé au statut : %s" -#: /controllers/comments_controller.php:84;116 +#: controllers/comments_controller.php:84;116 msgid "Invalid Node." msgstr "Noeud invalide" -#: /controllers/comments_controller.php:93 +#: controllers/comments_controller.php:93 msgid "Your comment has been added" msgstr "Votre commentaire a été ajouté" -#: /controllers/comments_controller.php:96 +#: controllers/comments_controller.php:96 msgid "Please correct errors below." msgstr "Merci de corriger les erreurs ci-dessous." -#: /controllers/comments_controller.php:120 +#: controllers/comments_controller.php:120 msgid "No permissions to see comments for that section" msgstr "Pas de permission pour voir les commentaires de cette section" -#: /controllers/comments_controller.php:128 -#: /views/nodes/view_all.ctp:110;120 +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 msgid "Comments for %s" msgstr "Commentaires pour %s" -#: /controllers/comments_controller.php:161 +#: controllers/comments_controller.php:161 msgid "Invalid Comment." msgstr "Commentaire invalide." -#: /controllers/comments_controller.php:180 -#: /views/comments/index.ctp:6 +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 msgid "Recent Comments" msgstr "Commentaires récents" -#: /controllers/comments_controller.php:182 -#: /views/layouts/default.ctp:43 +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 msgid "Recent Comments for all languages" msgstr "Commentaires récents pour toutes les langues" -#: /controllers/nodes_controller.php:846 +#: controllers/nodes_controller.php:848 msgid "Invalid Collection" msgstr "Collection invalide" -#: /controllers/nodes_controller.php:871;976 +#: controllers/nodes_controller.php:873;978 msgid "Thanks for your contribution! Your suggestion has been submitted for review." msgstr "Merci pour votre contribution ! Votre suggestion a été transmise pour révision." -#: /controllers/nodes_controller.php:931 +#: controllers/nodes_controller.php:933 msgid "This function is for comparing different (public) language content" msgstr "Cette fonction permet la comparaison de contenus (publics) dans différentes langues" -#: /controllers/revisions_controller.php:615;620;643 +#: controllers/revisions_controller.php:616;621;647 msgid "Only current and previous revisions can be viewed" msgstr "Seules les révisions courantes et précédentes peuvent être visualisées" -#: /controllers/revisions_controller.php:624 +#: controllers/revisions_controller.php:625 msgid "Only possible to compare revisions of the same node" msgstr "Il est seulement possible de comparer les révisions d'un même noeud" -#: /models/node.php:170 +#: controllers/revisions_controller.php:651 +#, fuzzy +msgid "Please login to access this revision" +msgstr "Merci de vous identifier pour continuer" + +#: models/node.php:170 msgid "Default Title" msgstr "Titre par défaut" -#: /models/node.php:173 +#: models/node.php:173 msgid "default_slug" msgstr "slug_par_defaut" -#: /models/node.php:176 +#: models/node.php:176 msgid "Default Content" msgstr "Contenu par défaut" -#: /plugins/users/views/users/login.ctp:8;20 -#: /views/elements/secondary_nav.ctp:23 +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 msgid "Login" msgstr "Login" -#: /plugins/users/views/users/login.ctp:13 +#: plugins/users/views/users/login.ctp:13 msgid "Forgot your password?" msgstr "Mot de passe oublié ?" -#: /views/changes/index.ctp:18 +#: views/changes/index.ctp:18 msgid "change submitted by %s, %s" msgstr "Modification soumise par %s, %s" -#: /views/changes/index.ctp:24 -#: /views/changes/rss/index.ctp:14 +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 msgid "accepted" msgstr "accepté" -#: /views/changes/index.ctp:27 -#: /views/changes/rss/index.ctp:17 +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 msgid "not accepted" msgstr "non accepté" -#: /views/changes/index.ctp:30 -#: /views/changes/rss/index.ctp:20 +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 msgid "pending" msgstr "en attente" -#: /views/changes/index.ctp:35 +#: views/changes/index.ctp:35 msgid "changed from %s to %s by %s, %s" msgstr "changé de %s à %s par %s, %s" -#: /views/changes/index.ctp:41 +#: views/changes/index.ctp:41 msgid "submitted by %s" msgstr "soumis par %s" -#: /views/comments/add.ctp:6 +#: views/changes/rss/index.ctp:28 +#, fuzzy +msgid "Submitted by: %s" +msgstr "soumis par %s" + +#: views/changes/rss/index.ctp:30 +#, fuzzy +msgid "Changed by: %s" +msgstr "Historique des modifications pour" + +#: views/comments/add.ctp:6 msgid "Comment: %s" msgstr "Commentaire : %s" -#: /views/comments/index.ctp:4 +#: views/comments/index.ctp:4 msgid "Comments: %s" msgstr "Commentaires : %s" -#: /views/comments/index.ctp:11 +#: views/comments/index.ctp:11 msgid "No Comments yet!" msgstr "Pas encore de commentaires !" -#: /views/comments/index.ctp:20 +#: views/comments/index.ctp:20 msgid "This page as a feed" msgstr "Cette page possède un flux" -#: /views/elements/attachments.ctp:2 +#: views/elements/attachments.ctp:2 msgid "Images/Files associated with this content" msgstr "Images / Fichiers associés à ce contenu" -#: /views/elements/comment.ctp:9 +#: views/elements/comment.ctp:9 msgid "unknown" msgstr "inconnu" -#: /views/elements/comment_form.ctp:4 +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "Par %s %s" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "par %s %s" + +#: views/elements/comment_form.ctp:4 msgid "Login to add a comment" msgstr "Identifiez-vous pour ajouter un commentaire" -#: /views/elements/comment_form.ctp:17 +#: views/elements/comment_form.ctp:17 msgid "Comment on %s" msgstr "Commentaire sur %s" -#: /views/elements/login_hint.ctp:3 +#: views/elements/login_hint.ctp:3 msgid "Login with your Bakery account" msgstr "Identifiez-vous avec votre compte Bakery" -#: /views/elements/login_hint.ctp:4 +#: views/elements/login_hint.ctp:4 msgid "Not got one? Hop on over to %s and sign up" msgstr "Vous n'en avez pas ? Faites un saut à %s et inscrivez-vous" -#: /views/elements/node_options.ctp:8 +#: views/elements/node_options.ctp:8 msgid "Edit" msgstr "Editer" -#: /views/elements/node_options.ctp:11 +#: views/elements/node_options.ctp:11 msgid "View just this section" msgstr "Voir juste cette section" -#: /views/elements/node_options.ctp:14 +#: views/elements/node_options.ctp:14 msgid "Comments (%s)" msgstr "Commentaires (%s)" -#: /views/elements/node_options.ctp:19 +#: views/elements/node_options.ctp:19 msgid "there is a pending change for this section" msgstr "il y a des modifications en cours pour cette section" -#: /views/elements/node_options.ctp:22 +#: views/elements/node_options.ctp:22 msgid "History" msgstr "historique" -#: /views/elements/node_options.ctp:32 +#: views/elements/node_options.ctp:32 msgid "This text may be out of sync with the English version" msgstr "Ce texte semble désynchronisé de la version anglaise" -#: /views/elements/node_options.ctp:39 +#: views/elements/node_options.ctp:39 msgid "Compare to original content" msgstr "Comparer au contenu original" -#: /views/elements/paging.ctp:4 +#: views/elements/paging.ctp:4 msgid "Page %s" msgstr "Page %s" -#: /views/elements/paging.ctp:5 +#: views/elements/paging.ctp:5 msgid "<< previous" msgstr "<< précédent" -#: /views/elements/paging.ctp:8 +#: views/elements/paging.ctp:8 msgid "Next >>" msgstr "Suivant >>" -#: /views/elements/search.ctp:22 -#: /views/elements/search_form.ctp:12 -msgid "Search" -msgstr "Rechercher" +#: views/elements/preview.ctp:6 +msgid "How'd you like them apples?" +msgstr "" -#: /views/elements/secondary_nav.ctp:10 -msgid "Top Contributors" -msgstr "Top des contributeurs" +#: views/elements/preview.ctp:7 +msgid "How's that for a slice of fried gold?" +msgstr "" -#: /views/elements/secondary_nav.ctp:13 -msgid "todo" +#: views/elements/preview.ctp:8 +msgid "How's that for a slice of cake?" msgstr "" -#: /views/elements/secondary_nav.ctp:17 +#: views/elements/preview.ctp:9 +msgid "Are we done yet?" +msgstr "" + +#: views/elements/preview.ctp:57 +msgid "Save it" +msgstr "" + +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "Rechercher" + +#: views/elements/secondary_nav.ctp:6 msgid "Logged in as %s" msgstr "Connecté en tant que %s" -#: /views/elements/secondary_nav.ctp:18 +#: views/elements/secondary_nav.ctp:7 msgid "Logout" msgstr "Déconnexion" -#: /views/elements/secondary_nav.ctp:26 +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "Top des contributeurs" + +#: views/elements/secondary_nav.ctp:28 +msgid "Todo" +msgstr "" + +#: views/elements/secondary_nav.ctp:30 msgid "About CakePHP" msgstr "A propos de CakePHP" -#: /views/elements/secondary_nav.ctp:27 +#: views/elements/secondary_nav.ctp:31 msgid "Donate" msgstr "Donation" -#: /views/elements/side_menu.ctp:14 -#: /views/nodes/view_all.ctp:95 +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 msgid "All in one page" msgstr "Tout sur une page" -#: /views/elements/side_menu.ctp:23 -#: /views/nodes/view_all.ctp:102 +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 msgid "Suggest a new section here" msgstr "Suggérer une nouvelle section ici" -#: /views/elements/side_menu.ctp:30 +#: views/elements/side_menu.ctp:30 msgid "Options" msgstr "Options" -#: /views/elements/toc.ctp:13 -#: /views/nodes/toc.ctp:5 +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 msgid "Table of Contents" msgstr "Table des matières" -#: /views/elements/toc.ctp:16 +#: views/elements/toc.ctp:16 msgid "see fully expanded table of contents (only)" msgstr "voir toute la table des matières dépliée" -#: /views/elements/toc.ctp:19 +#: views/elements/toc.ctp:19 msgid "Books in " msgstr "Livres en" -#: /views/elements/toc.ctp:21 +#: views/elements/toc.ctp:21 msgid "Available collections" msgstr "Collections disponibles" -#: /views/layouts/default.ctp:38 +#: views/layouts/default.ctp:38 msgid "Recent comments" msgstr "Commentaires récents" -#: /views/layouts/default.ctp:51;55 +#: views/layouts/default.ctp:51;55 msgid "My Submissions" msgstr "Mes soumissions" -#: /views/layouts/default.ctp:88 +#: views/layouts/default.ctp:88 msgid "Welcome to %s" msgstr "Bienvenu dans %s" -#: /views/layouts/error.ctp:6 -msgid "CakePHP: the rapid development php framework:" -msgstr "CakePHP : le framework de développement rapide PHP :" - -#: /views/layouts/error.ctp:34 +#: views/layouts/error.ctp:6;34 msgid "CakePHP: the rapid development php framework" msgstr "CakePHP : le framework de développement rapide PHP" -#: /views/nodes/add.ctp:17 -#: /views/nodes/edit.ctp:26 +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." msgstr "Merci de revoir les directives de contribution au CookBook pour vous assurer de la cohérence" -#: /views/nodes/add.ctp:22 +#: views/nodes/add.ctp:22 msgid "Add a new section" msgstr "Ajouter une nouvelle section" -#: /views/nodes/add.ctp:28 -#: /views/nodes/edit.ctp:32 +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 msgid "Show me a preview before submitting" msgstr "Montrez-moi une prévisualisation avant de soumettre" -#: /views/nodes/add.ctp:30 +#: views/nodes/add.ctp:30 msgid "under" msgstr "sous" -#: /views/nodes/add.ctp:33 +#: views/nodes/add.ctp:33 msgid "after" msgstr "après" -#: /views/nodes/add.ctp:39 -#: /views/nodes/edit.ctp:35 +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" msgstr "Contenus. Le code dans les balise pre sera échappé. Les soumissions sans formatage HTML seront formatés automatiquement" -#: /views/nodes/add.ctp:44 +#: views/nodes/add.ctp:44 msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" msgstr "Expliquez brièvement pourquoi vous proposez cet ajout (en anglais s'il vous plait) :)" -#: /views/nodes/admin_merge.ctp:18 +#: views/nodes/admin_merge.ctp:18 msgid "You are sure? Please check the preview" msgstr "Etes-vous sûr ? Merci de vérifier la prévisualisation" -#: /views/nodes/compare.ctp:11 -#: /views/revisions/view.ctp:12 +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 msgid "Differences" msgstr "Différences" -#: /views/nodes/edit.ctp:40 +#: views/nodes/edit.ctp:40 msgid "What is the reason for the edit? (In English Please) :)" msgstr "Quelle est la raison de cette édition ? (en anglais s'il vous plait) :)" -#: /views/nodes/history.ctp:6 +#: views/nodes/history.ctp:6 msgid "See English edits too" msgstr "Voyez également les éditions en anglais" -#: /views/nodes/stats.ctp:5 +#: views/nodes/stats.ctp:5 msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." msgstr "" -#: /views/nodes/stats.ctp:7;37 +#: views/nodes/stats.ctp:7;37 msgid "Top %s Contributors" msgstr "Top %s Contributors" -#: /views/nodes/stats.ctp:9;38 +#: views/nodes/stats.ctp:9;38 msgid "Last update: %s" msgstr "" -#: /views/nodes/stats.ctp:27;63 +#: views/nodes/stats.ctp:27;63 msgid "%s (%s current)" msgstr "" -#: /views/nodes/stats.ctp:39 +#: views/nodes/stats.ctp:39 msgid "%s%% translated" msgstr "" -#: /views/nodes/stats.ctp:41 +#: views/nodes/stats.ctp:41 msgid "The cookbook needs you! No submissions for this language!" msgstr "" -#: /views/nodes/stats.ctp:44 +#: views/nodes/stats.ctp:44 msgid "The cookbook needs you! This language will soon be removed if not updated." msgstr "" -#: /views/nodes/stats.ctp:46 +#: views/nodes/stats.ctp:46 msgid "The cookbook needs you! No updates for one month." msgstr "" -#: /views/nodes/todo.ctp:7 +#: views/nodes/todo.ctp:7 +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "" + +#: views/nodes/todo.ctp:10 msgid "These is no <a href=\"%s\">po file</a> for %s" msgstr "" -#: /views/nodes/todo.ctp:9 +#: views/nodes/todo.ctp:13 +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "" + +#: views/nodes/todo.ctp:14 msgid "These sections either do not have a translation, or the English text has changed since it was translated" msgstr "" -#: /views/nodes/view_all.ctp:40;67 +#: views/nodes/view_all.ctp:40;67 msgid "See comments for this section" msgstr "Voir les commentaires pour cette section" -#: /views/nodes/view_all.ctp:114;126 +#: views/nodes/view_all.ctp:114;126 msgid "Change history for %s" msgstr "Historique des modifications pour" -#: /views/revisions/results.ctp:8 +#: views/revisions/results.ctp:8 msgid "Search Results" msgstr "Résultats de recherche" -#: /views/revisions/results.ctp:32 +#: views/revisions/results.ctp:32 msgid "No results" msgstr "Aucun résultat" -#: /views/revisions/search.ctp:1 +#: views/revisions/search.ctp:1 msgid "Search book.cakephp.org" msgstr "Chercher dans book.cakephp.org" -#: /webroot/test.php:75 -msgid "Debug setting does not allow access to this url." -msgstr "" +#~ msgid "CakePHP: the rapid development php framework:" +#~ msgstr "CakePHP : le framework de développement rapide PHP :" #, fuzzy #~ msgid "Top %s contributors" diff --git a/locale/ind/LC_MESSAGES/default.po b/locale/ind/LC_MESSAGES/default.po new file mode 100644 index 0000000..2d18ca2 --- /dev/null +++ b/locale/ind/LC_MESSAGES/default.po @@ -0,0 +1,493 @@ +msgid "" +msgstr "" +"Project-Id-Version: cbt\n" +"POT-Creation-Date: 2008-12-04 15:20-0200\n" +"PO-Revision-Date: 2008-12-09 14:38-0300\n" +"Last-Translator: Renan Gonçalves <renan.saddam@gmail.com>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Basepath: ../../../\n" + +#: app_controller.php:93 +msgid "Whoops, not a valid language." +msgstr "Aduh, bukan bahasa yang sah." + +#: app_controller.php:109 +msgid "Please login to continue" +msgstr "Silahkan masuk untuk melanjutkan." + +#: app_controller.php:293 +msgid "All %s matching the term \"%s\"" +msgstr "Semua %s yang terkait dengan istilah \"%s\"" + +#: controllers/attachments_controller.php:85 +msgid "Attachment controller - no class or foreignKey error." +msgstr "Attachment controller - tidak ada kesalahan pada class atau foreignKey" + +#: controllers/attachments_controller.php:110 +msgid "Existing Attachment for %s, id %s updated" +msgstr "Lampiran terdahulu untuk %s, id %s telah diperbaharui." + +#: controllers/attachments_controller.php:112 +msgid "New Attachment for %s, id %s added" +msgstr "Lampiran baru untuk %s, id %s telah ditambahkan." + +#: controllers/attachments_controller.php:137 +msgid "%s with id %s updated" +msgstr "%s dengan id %s telah diperbaharui." + +#: controllers/attachments_controller.php:140 +msgid "errors in form" +msgstr "kesalahan pada formulir" + +#: controllers/changes_controller.php:130 +msgid "Recent Changes for %s" +msgstr "Perubahan Terkini untuk %s" + +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 +msgid "Recent Changes for all languages" +msgstr "Perubahan terkini untuk semua bahasa" + +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 +msgid "Recent Changes" +msgstr "Perubahan Terkini" + +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 +msgid "by %s" +msgstr "oleh %s" + +#: controllers/changes_controller.php:149 +msgid "restricted to status: %s" +msgstr "dibatasi atas status: %s" + +#: controllers/comments_controller.php:84;116 +msgid "Invalid Node." +msgstr "Node tidak sah." + +#: controllers/comments_controller.php:93 +msgid "Your comment has been added" +msgstr "Komentar anda telah ditambahkan." + +#: controllers/comments_controller.php:96 +msgid "Please correct errors below." +msgstr "Silahkan perbaiki kesalahan-kesalahan di bawah ini." + +#: controllers/comments_controller.php:120 +msgid "No permissions to see comments for that section" +msgstr "Tidak berhak melihat komentar untuk bagian tersebut." + +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 +msgid "Comments for %s" +msgstr "Komentar untuk %s" + +#: controllers/comments_controller.php:161 +msgid "Invalid Comment." +msgstr "Komentar tidak sah." + +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 +msgid "Recent Comments" +msgstr "Komentar Terkini" + +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 +msgid "Recent Comments for all languages" +msgstr "Komentar Terkini untuk semua bahasa" + +#: controllers/nodes_controller.php:848 +msgid "Invalid Collection" +msgstr "Koleksi tidak sah" + +#: controllers/nodes_controller.php:873;978 +msgid "Thanks for your contribution! Your suggestion has been submitted for review." +msgstr "Terima kasih atas kontribusi Anda! Anjuran Anda telah dikirim untuk kami tinjau." + +#: controllers/nodes_controller.php:933 +msgid "This function is for comparing different (public) language content" +msgstr "Fungsi ini adalah untuk membedakan isi dari berbagai bahasa (publik)" + +#: controllers/revisions_controller.php:616;621;647 +msgid "Only current and previous revisions can be viewed" +msgstr "Hanya revisi terkini dan yang terdahulu yang dapat dilihat" + +#: controllers/revisions_controller.php:625 +msgid "Only possible to compare revisions of the same node" +msgstr "Hanya mungkin untuk membedakan revisi pada node yang sama" + +#: controllers/revisions_controller.php:651 +#, fuzzy +msgid "Please login to access this revision" +msgstr "Silahkan masuk untuk melanjutkan." + +#: models/node.php:170 +msgid "Default Title" +msgstr "Judul Awal" + +#: models/node.php:173 +msgid "default_slug" +msgstr "default_slug" + +#: models/node.php:176 +msgid "Default Content" +msgstr "Isi Awal" + +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 +msgid "Login" +msgstr "Masuk" + +#: plugins/users/views/users/login.ctp:13 +msgid "Forgot your password?" +msgstr "Lupa password?" + +#: views/changes/index.ctp:18 +msgid "change submitted by %s, %s" +msgstr "perubahan dikirim oleh %s, %s" + +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 +msgid "accepted" +msgstr "diterima" + +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 +msgid "not accepted" +msgstr "ditolak" + +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 +msgid "pending" +msgstr "ditangguhkan" + +#: views/changes/index.ctp:35 +msgid "changed from %s to %s by %s, %s" +msgstr "berubah dari %s menjadi %s oleh %s, %s" + +#: views/changes/index.ctp:41 +msgid "submitted by %s" +msgstr "dikirim oleh %s" + +#: views/changes/rss/index.ctp:28 +#, fuzzy +msgid "Submitted by: %s" +msgstr "dikirim oleh %s" + +#: views/changes/rss/index.ctp:30 +#, fuzzy +msgid "Changed by: %s" +msgstr "Sejarah Perubahan untuk %s" + +#: views/comments/add.ctp:6 +msgid "Comment: %s" +msgstr "Komentar: %s" + +#: views/comments/index.ctp:4 +msgid "Comments: %s" +msgstr "Komentar: %s" + +#: views/comments/index.ctp:11 +msgid "No Comments yet!" +msgstr "Belum ada komentar!" + +#: views/comments/index.ctp:20 +msgid "This page as a feed" +msgstr "Halaman ini sebagai feed" + +#: views/elements/attachments.ctp:2 +msgid "Images/Files associated with this content" +msgstr "Gambar/Berkas terkait dengan isi ini" + +#: views/elements/comment.ctp:9 +msgid "unknown" +msgstr "tidak diketahui" + +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "Oleh %s %s" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "oleh %s %s" + +#: views/elements/comment_form.ctp:4 +msgid "Login to add a comment" +msgstr "Masuk untuk memberikan komentar" + +#: views/elements/comment_form.ctp:17 +msgid "Comment on %s" +msgstr "Komentar pada %s" + +#: views/elements/login_hint.ctp:3 +msgid "Login with your Bakery account" +msgstr "masuk dengan akun Bakery Anda" + +#: views/elements/login_hint.ctp:4 +msgid "Not got one? Hop on over to %s and sign up" +msgstr "Belum mempunyai akun? Silahkan mendaftar" + +#: views/elements/node_options.ctp:8 +msgid "Edit" +msgstr "Sunting" + +#: views/elements/node_options.ctp:11 +msgid "View just this section" +msgstr "Lihat hanya bagian ini" + +#: views/elements/node_options.ctp:14 +msgid "Comments (%s)" +msgstr "Komentar (%s)" + +#: views/elements/node_options.ctp:19 +msgid "there is a pending change for this section" +msgstr "ada perubahan yang masih ditangguhkan untuk bagian ini" + +#: views/elements/node_options.ctp:22 +msgid "History" +msgstr "Sejarah" + +#: views/elements/node_options.ctp:32 +msgid "This text may be out of sync with the English version" +msgstr "Teks ini mungkin saja tidak sejalan dengan versi bahasa Inggris" + +#: views/elements/node_options.ctp:39 +msgid "Compare to original content" +msgstr "Bandingkan dengan isi yang asli" + +#: views/elements/paging.ctp:4 +msgid "Page %s" +msgstr "Halaman %s" + +#: views/elements/paging.ctp:5 +msgid "<< previous" +msgstr "<< sebelumnya" + +#: views/elements/paging.ctp:8 +msgid "Next >>" +msgstr "Selanjutnya >>" + +#: views/elements/preview.ctp:6 +msgid "How'd you like them apples?" +msgstr "" + +#: views/elements/preview.ctp:7 +msgid "How's that for a slice of fried gold?" +msgstr "" + +#: views/elements/preview.ctp:8 +msgid "How's that for a slice of cake?" +msgstr "" + +#: views/elements/preview.ctp:9 +msgid "Are we done yet?" +msgstr "" + +#: views/elements/preview.ctp:57 +msgid "Save it" +msgstr "" + +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "Cari" + +#: views/elements/secondary_nav.ctp:6 +msgid "Logged in as %s" +msgstr "Masuk sebagai %s" + +#: views/elements/secondary_nav.ctp:7 +msgid "Logout" +msgstr "Keluar" + +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "Kontributor Teratas" + +#: views/elements/secondary_nav.ctp:28 +#, fuzzy +msgid "Todo" +msgstr "harus dikerjakan" + +#: views/elements/secondary_nav.ctp:30 +msgid "About CakePHP" +msgstr "Tentang CakePHP" + +#: views/elements/secondary_nav.ctp:31 +msgid "Donate" +msgstr "Sumbang" + +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 +msgid "All in one page" +msgstr "Semuanya dalam satu halaman" + +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 +msgid "Suggest a new section here" +msgstr "Anjurkan bagian baru di sini" + +#: views/elements/side_menu.ctp:30 +msgid "Options" +msgstr "Pilihan" + +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 +msgid "Table of Contents" +msgstr "Daftar Isi" + +#: views/elements/toc.ctp:16 +msgid "see fully expanded table of contents (only)" +msgstr "lihat keseluruhan daftar isi " + +#: views/elements/toc.ctp:19 +msgid "Books in " +msgstr "Buku dalam" + +#: views/elements/toc.ctp:21 +msgid "Available collections" +msgstr "Koleksi yang tersedia" + +#: views/layouts/default.ctp:38 +msgid "Recent comments" +msgstr "Komentar terkini" + +#: views/layouts/default.ctp:51;55 +msgid "My Submissions" +msgstr "Kiriman Saya" + +#: views/layouts/default.ctp:88 +msgid "Welcome to %s" +msgstr "Selamat datang %s" + +#: views/layouts/error.ctp:6;34 +msgid "CakePHP: the rapid development php framework" +msgstr "CakePHP: the rapid development php framework" + +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 +msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." +msgstr "Silahkan tinjau kembali panduan untuk mengirimkan isi ke dalam buku resep untuk memastikan konsistensi." + +#: views/nodes/add.ctp:22 +msgid "Add a new section" +msgstr "Tambahkan bagian baru" + +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 +msgid "Show me a preview before submitting" +msgstr "Perlihatkan preview sebelum mengirim" + +#: views/nodes/add.ctp:30 +msgid "under" +msgstr "di bawah" + +#: views/nodes/add.ctp:33 +msgid "after" +msgstr "setelah" + +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 +msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" +msgstr "Isi. Kode dalam tag pre akan di-escape. Pengiriman tanpa kode html akan diformat secara otomatis" + +#: views/nodes/add.ctp:44 +msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" +msgstr "Jelaskan dengan singkat mengapa anda mengajukan penambahan ini (usahakan dalam bahasa Inggris)" + +#: views/nodes/admin_merge.ctp:18 +msgid "You are sure? Please check the preview" +msgstr "Anda yakin? Silahkan lihat preview" + +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 +msgid "Differences" +msgstr "Perbedaan" + +#: views/nodes/edit.ctp:40 +msgid "What is the reason for the edit? (In English Please) :)" +msgstr "Apa alasan penyuntingan ini dilakukan? (usahakan dalam bahasa Inggris)" + +#: views/nodes/history.ctp:6 +msgid "See English edits too" +msgstr "Lihat suntingan dalam bahasa Inggris-nya juga" + +#: views/nodes/stats.ctp:5 +msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." +msgstr "Berikut ini ditujukan kepada orang-orang yang telah mendedikasikan waktu, keringat dan air mata untuk menulis, menerjemahkan dan mengedit isi buku resep." + +#: views/nodes/stats.ctp:7;37 +msgid "Top %s Contributors" +msgstr "%s Kontributor Teratas" + +#: views/nodes/stats.ctp:9;38 +msgid "Last update: %s" +msgstr "Pembaharuan terakhir: %s" + +#: views/nodes/stats.ctp:27;63 +msgid "%s (%s current)" +msgstr "%s (terkini adalah %s)" + +#: views/nodes/stats.ctp:39 +msgid "%s%% translated" +msgstr "telah diterjemahkan sebanyak %s% %" + +#: views/nodes/stats.ctp:41 +msgid "The cookbook needs you! No submissions for this language!" +msgstr "Buku resep ini membutuhkanmu! Tidak ada kiriman untuk bahasa ini!" + +#: views/nodes/stats.ctp:44 +msgid "The cookbook needs you! This language will soon be removed if not updated." +msgstr "Buku resep ini membutuhkanmu! Bahasa ini akan dibuang jika tidak diperbaharui." + +#: views/nodes/stats.ctp:46 +msgid "The cookbook needs you! No updates for one month." +msgstr "Buku resep ini membutuhkanmu! tidak ada pembaharuan selama sebulan!" + +#: views/nodes/todo.ctp:7 +#, fuzzy +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "Tidak ada <a href=\"%s\">po file</a> untuk %s" + +#: views/nodes/todo.ctp:10 +msgid "These is no <a href=\"%s\">po file</a> for %s" +msgstr "Tidak ada <a href=\"%s\">po file</a> untuk %s" + +#: views/nodes/todo.ctp:13 +#, fuzzy +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "Silahkan masuk untuk melanjutkan." + +#: views/nodes/todo.ctp:14 +msgid "These sections either do not have a translation, or the English text has changed since it was translated" +msgstr "Bagian ini tidak mempunyai terjemahan, atau teks dalam bahasa Inggris-nya telah berubah sejak waktu diterjemahkan" + +#: views/nodes/view_all.ctp:40;67 +msgid "See comments for this section" +msgstr "Lihat komentar untuk bagian ini" + +#: views/nodes/view_all.ctp:114;126 +msgid "Change history for %s" +msgstr "Sejarah Perubahan untuk %s" + +#: views/revisions/results.ctp:8 +msgid "Search Results" +msgstr "Hasil Pencarian" + +#: views/revisions/results.ctp:32 +msgid "No results" +msgstr "Tidak ada hasil" + +#: views/revisions/search.ctp:1 +msgid "Search book.cakephp.org" +msgstr "Cari di book.cakephp.org" + +#~ msgid "CakePHP: the rapid development php framework:" +#~ msgstr "CakePHP: the rapid development php framework:" +#~ msgid "Debug setting does not allow access to this url." +#~ msgstr "Pengaturan pada debug tidak memperkenankan akses ke url ini." + diff --git a/locale/jpn/LC_MESSAGES/default.po b/locale/jpn/LC_MESSAGES/default.po new file mode 100755 index 0000000..424ef83 --- /dev/null +++ b/locale/jpn/LC_MESSAGES/default.po @@ -0,0 +1,485 @@ +msgid "" +msgstr "" +"Project-Id-Version: Cookbook 1.0\n" +"POT-Creation-Date: 2008-12-04 15:20-0200\n" +"PO-Revision-Date: 2008-12-19 23:23-0500\n" +"Last-Translator: Yusuke Ando <yandod@gmail.com>\n" +"Language-Team: Documentation CakePHP <docs@cakephp.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Basepath: ../../../\n" + +#: app_controller.php:93 +msgid "Whoops, not a valid language." +msgstr "言語が正常でないみたいです・・・" + +#: app_controller.php:109 +msgid "Please login to continue" +msgstr "続けるにはログインしてください" + +#: app_controller.php:293 +msgid "All %s matching the term \"%s\"" +msgstr "全ての %s (%s からの検索結果)" + +#: controllers/attachments_controller.php:85 +msgid "Attachment controller - no class or foreignKey error." +msgstr "" + +#: controllers/attachments_controller.php:110 +msgid "Existing Attachment for %s, id %s updated" +msgstr "登録されていた %s への添付 id %s は更新されました" + +#: controllers/attachments_controller.php:112 +msgid "New Attachment for %s, id %s added" +msgstr "新しい %s への添付 id %s が登録されました" + +#: controllers/attachments_controller.php:137 +msgid "%s with id %s updated" +msgstr "%s id %s は更新されました" + +#: controllers/attachments_controller.php:140 +msgid "errors in form" +msgstr "フォームにエラーがあります" + +#: controllers/changes_controller.php:130 +msgid "Recent Changes for %s" +msgstr "%s への最近の変更" + +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 +msgid "Recent Changes for all languages" +msgstr "全ての言語への最近の変更" + +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 +msgid "Recent Changes" +msgstr "最近の変更" + +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 +msgid "by %s" +msgstr "登録者 %s" + +#: controllers/changes_controller.php:149 +msgid "restricted to status: %s" +msgstr "ステータスを %s に変更しました" + +#: controllers/comments_controller.php:84;116 +msgid "Invalid Node." +msgstr "ノードが異常です" + +#: controllers/comments_controller.php:93 +msgid "Your comment has been added" +msgstr "あなたのコメントは登録されました" + +#: controllers/comments_controller.php:96 +msgid "Please correct errors below." +msgstr "以下のエラーを訂正してください" + +#: controllers/comments_controller.php:120 +msgid "No permissions to see comments for that section" +msgstr "このセクションのコメントを見る権限がありません" + +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 +msgid "Comments for %s" +msgstr "%s へのコメント" + +#: controllers/comments_controller.php:161 +msgid "Invalid Comment." +msgstr "正しくないコメントです。" + +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 +msgid "Recent Comments" +msgstr "最近のコメント" + +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 +msgid "Recent Comments for all languages" +msgstr "全ての言語への最近のコメント" + +#: controllers/nodes_controller.php:848 +msgid "Invalid Collection" +msgstr "正しくないコレクションです" + +#: controllers/nodes_controller.php:873;978 +msgid "Thanks for your contribution! Your suggestion has been submitted for review." +msgstr "ご協力ありがとうございます! 投稿内容はレビューへ回送されました" + +#: controllers/nodes_controller.php:933 +msgid "This function is for comparing different (public) language content" +msgstr "この機能は他の言語のコンテンツとの比較の為のものです" + +#: controllers/revisions_controller.php:616;621;647 +msgid "Only current and previous revisions can be viewed" +msgstr "現在と直前のリビジョンのみ閲覧できます" + +#: controllers/revisions_controller.php:625 +msgid "Only possible to compare revisions of the same node" +msgstr "同一ノードのリビジョン間のみ比較できます" + +#: controllers/revisions_controller.php:651 +msgid "Please login to access this revision" +msgstr "このリビジョンにアクセスするにはログインしてください" + +#: models/node.php:170 +msgid "Default Title" +msgstr "このセクションはまだ書かれていません" + +#: models/node.php:173 +msgid "default_slug" +msgstr "見つかりません" + +#: models/node.php:176 +msgid "Default Content" +msgstr "<p>このセクションはまだ書かれていません。何かアイデアがあればリンクから提案をお願いします</p>" + +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 +msgid "Login" +msgstr "ログイン" + +#: plugins/users/views/users/login.ctp:13 +msgid "Forgot your password?" +msgstr "パスワードを忘れた時は?" + +#: views/changes/index.ctp:18 +msgid "change submitted by %s, %s" +msgstr "変更は登録されました by %s %s" + +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 +msgid "accepted" +msgstr "承認" + +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 +msgid "not accepted" +msgstr "非承認" + +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 +msgid "pending" +msgstr "保留" + +#: views/changes/index.ctp:35 +msgid "changed from %s to %s by %s, %s" +msgstr "%s から %s へ変更されました 変更者 %s, %s" + +#: views/changes/index.ctp:41 +msgid "submitted by %s" +msgstr "%s による投稿" + +#: views/changes/rss/index.ctp:28 +msgid "Submitted by: %s" +msgstr "投稿者: %s" + +#: views/changes/rss/index.ctp:30 +msgid "Changed by: %s" +msgstr "変更者: %s" + +#: views/comments/add.ctp:6 +msgid "Comment: %s" +msgstr "コメント: %s" + +#: views/comments/index.ctp:4 +msgid "Comments: %s" +msgstr "コメント: %s" + +#: views/comments/index.ctp:11 +msgid "No Comments yet!" +msgstr "まだコメントはありません" + +#: views/comments/index.ctp:20 +msgid "This page as a feed" +msgstr "このページをフィードで" + +#: views/elements/attachments.ctp:2 +msgid "Images/Files associated with this content" +msgstr "このコンテンツに関連付けられたファイル・画像" + +#: views/elements/comment.ctp:9 +msgid "unknown" +msgstr "不明" + +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "変更者 %s 変更日時 %s" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "変更者 %s %s" + +#: views/elements/comment_form.ctp:4 +msgid "Login to add a comment" +msgstr "コメントするにはログインしてください" + +#: views/elements/comment_form.ctp:17 +msgid "Comment on %s" +msgstr "%s へのコメント" + +#: views/elements/login_hint.ctp:3 +msgid "Login with your Bakery account" +msgstr "Bakeryのアカウントでログインしてください" + +#: views/elements/login_hint.ctp:4 +msgid "Not got one? Hop on over to %s and sign up" +msgstr "アカウントをまだ取っていませんか? %s へアクセスして取得してください" + +#: views/elements/node_options.ctp:8 +msgid "Edit" +msgstr "編集" + +#: views/elements/node_options.ctp:11 +msgid "View just this section" +msgstr "このセクションを見る" + +#: views/elements/node_options.ctp:14 +msgid "Comments (%s)" +msgstr "コメント (%s)" + +#: views/elements/node_options.ctp:19 +msgid "there is a pending change for this section" +msgstr "このセクションには保留されている変更があります" + +#: views/elements/node_options.ctp:22 +msgid "History" +msgstr "変更履歴" + +#: views/elements/node_options.ctp:32 +msgid "This text may be out of sync with the English version" +msgstr "このテキストは英語版と同期がとれていないようです" + +#: views/elements/node_options.ctp:39 +msgid "Compare to original content" +msgstr "オリジナルとの比較" + +#: views/elements/paging.ctp:4 +msgid "Page %s" +msgstr "%sページ" + +#: views/elements/paging.ctp:5 +msgid "<< previous" +msgstr "<<前へ" + +#: views/elements/paging.ctp:8 +msgid "Next >>" +msgstr "次へ>>" + +#: views/elements/preview.ctp:6 +msgid "How'd you like them apples?" +msgstr "" + +#: views/elements/preview.ctp:7 +msgid "How's that for a slice of fried gold?" +msgstr "" + +#: views/elements/preview.ctp:8 +msgid "How's that for a slice of cake?" +msgstr "" + +#: views/elements/preview.ctp:9 +msgid "Are we done yet?" +msgstr "" + +#: views/elements/preview.ctp:57 +msgid "Save it" +msgstr "保存" + +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "検索" + +#: views/elements/secondary_nav.ctp:6 +msgid "Logged in as %s" +msgstr "%s としてログインしました" + +#: views/elements/secondary_nav.ctp:7 +msgid "Logout" +msgstr "ログアウト" + +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "優秀な貢献者" + +#: views/elements/secondary_nav.ctp:28 +msgid "Todo" +msgstr "Todo" + +#: views/elements/secondary_nav.ctp:30 +msgid "About CakePHP" +msgstr "CakePHPについて" + +#: views/elements/secondary_nav.ctp:31 +msgid "Donate" +msgstr "寄付" + +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 +msgid "All in one page" +msgstr "全てを1ページで" + +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 +msgid "Suggest a new section here" +msgstr "新しいセクションを提案する" + +#: views/elements/side_menu.ctp:30 +msgid "Options" +msgstr "オプション" + +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 +msgid "Table of Contents" +msgstr "目次" + +#: views/elements/toc.ctp:16 +msgid "see fully expanded table of contents (only)" +msgstr "完全な目次を見る" + +#: views/elements/toc.ctp:19 +msgid "Books in " +msgstr "ブックス in" + +#: views/elements/toc.ctp:21 +msgid "Available collections" +msgstr "閲覧可能なコレクション" + +#: views/layouts/default.ctp:38 +msgid "Recent comments" +msgstr "最近のコメント" + +#: views/layouts/default.ctp:51;55 +msgid "My Submissions" +msgstr "自分の提案" + +#: views/layouts/default.ctp:88 +msgid "Welcome to %s" +msgstr "%s へようこそ" + +#: views/layouts/error.ctp:6;34 +msgid "CakePHP: the rapid development php framework" +msgstr "CakePHP: 高速開発PHPフレームワーク" + +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 +msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." +msgstr "Cookbookの一貫性の為に登録の際はガイドラインを確認してください。" + +#: views/nodes/add.ctp:22 +msgid "Add a new section" +msgstr "新しいセクションを追加する" + +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 +msgid "Show me a preview before submitting" +msgstr "登録の前にプレビューを見せてください" + +#: views/nodes/add.ctp:30 +msgid "under" +msgstr "下の" + +#: views/nodes/add.ctp:33 +msgid "after" +msgstr "以降の" + +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 +msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" +msgstr "preタグの中のコードはエスケープされます。htmlフォーマットされていない投稿は自動的にhtmlでフォーマットされます" + +#: views/nodes/add.ctp:44 +msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" +msgstr "任意 この提案を行う理由を説明してください (英語でお願いします) :)" + +#: views/nodes/admin_merge.ctp:18 +msgid "You are sure? Please check the preview" +msgstr "よろしいですか?プレビューを確認してください" + +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 +msgid "Differences" +msgstr "差分" + +#: views/nodes/edit.ctp:40 +msgid "What is the reason for the edit? (In English Please) :)" +msgstr "この変更の理由は何ですか?(英語でお願いします)" + +#: views/nodes/history.ctp:6 +msgid "See English edits too" +msgstr "英語の編集もご覧ください" + +#: views/nodes/stats.ctp:5 +msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." +msgstr "" + +#: views/nodes/stats.ctp:7;37 +msgid "Top %s Contributors" +msgstr "トップ %s 貢献者" + +#: views/nodes/stats.ctp:9;38 +msgid "Last update: %s" +msgstr "最終更新: %s" + +#: views/nodes/stats.ctp:27;63 +msgid "%s (%s current)" +msgstr "%s (通算 %s)" + +#: views/nodes/stats.ctp:39 +msgid "%s%% translated" +msgstr "%s%% 翻訳済み" + +#: views/nodes/stats.ctp:41 +msgid "The cookbook needs you! No submissions for this language!" +msgstr "cookbook はあなたを必要としています!この言語にはまだ提案がありません" + +#: views/nodes/stats.ctp:44 +msgid "The cookbook needs you! This language will soon be removed if not updated." +msgstr "cookbookはあなたを必要としています。この言語は変更がなければ間もなく削除されます" + +#: views/nodes/stats.ctp:46 +msgid "The cookbook needs you! No updates for one month." +msgstr "cookbookはあなたを必要としています。1か月間変更がありません" + +#: views/nodes/todo.ctp:7 +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "この<a href=\"%s\">po file</a>の変更を確認 %s の為に確認しますか?" + +#: views/nodes/todo.ctp:10 +msgid "These is no <a href=\"%s\">po file</a> for %s" +msgstr "<a href=\"%s\">po file</a> がありません。 対象 %s" + +#: views/nodes/todo.ctp:13 +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "pp files を編集する場合は <a href=\"http://www.poedit.net\">Po Edit</a> を使ってください" + +#: views/nodes/todo.ctp:14 +msgid "These sections either do not have a translation, or the English text has changed since it was translated" +msgstr "これらのセクションはまだ翻訳されていないか、翻訳されてから英語版が変更されています" + +#: views/nodes/view_all.ctp:40;67 +msgid "See comments for this section" +msgstr "このセクションへのコメントを見る" + +#: views/nodes/view_all.ctp:114;126 +msgid "Change history for %s" +msgstr "%s への変更履歴" + +#: views/revisions/results.ctp:8 +msgid "Search Results" +msgstr "検索結果" + +#: views/revisions/results.ctp:32 +msgid "No results" +msgstr "見つかりませんでした" + +#: views/revisions/search.ctp:1 +msgid "Search book.cakephp.org" +msgstr "book.cakephp.org を検索" + +#~ msgid "Debug setting does not allow access to this url." +#~ msgstr "Debug setting does not allow access to this url." + diff --git a/locale/may/LC_MESSAGES/default.po b/locale/may/LC_MESSAGES/default.po new file mode 100644 index 0000000..1b029aa --- /dev/null +++ b/locale/may/LC_MESSAGES/default.po @@ -0,0 +1,491 @@ +# LANGUAGE translation of Cakebook Application +# Copyright 2008 Andy Dawson <andydawson76@yahoo.co.uk> +# Generated from files: +# Revision: 697 app_controller.php +# Revision: 689 controllers/attachments_controller.php +# Revision: 689 controllers/changes_controller.php +# Revision: 702 views/layouts/default.ctp +# Revision: 689 controllers/comments_controller.php +# Revision: 706 views/nodes/view_all.ctp +# Revision: 600 views/comments/index.ctp +# Revision: 704 controllers/nodes_controller.php +# Revision: 711 controllers/revisions_controller.php +# Revision: 701 models/node.php +# Revision: 659 plugins/users/views/users/login.ctp +# Revision: 705 views/elements/secondary_nav.ctp +# Revision: 600 views/changes/index.ctp +# Revision: 638 views/changes/rss/index.ctp +# Revision: 600 views/comments/add.ctp +# Revision: 666 views/elements/attachments.ctp +# Revision: 673 views/elements/comment.ctp +# Revision: 661 views/elements/comment_form.ctp +# Revision: 600 views/elements/login_hint.ctp +# Revision: 705 views/elements/node_options.ctp +# Revision: 673 views/elements/paging.ctp +# Revision: 600 views/elements/search.ctp +# Revision: 672 views/elements/side_menu.ctp +# Revision: 600 views/elements/toc.ctp +# Revision: 673 views/nodes/toc.ctp +# Revision: 600 views/layouts/error.ctp +# Revision: 672 views/nodes/add.ctp +# Revision: 673 views/nodes/edit.ctp +# Revision: 600 views/nodes/admin_merge.ctp +# Revision: 600 views/nodes/history.ctp +# Revision: 708 views/nodes/stats.ctp +# Revision: 707 views/nodes/todo.ctp +# Revision: 673 views/revisions/results.ctp +# +msgid "" +msgstr "" +"Project-Id-Version: cakebook-\n" +"POT-Creation-Date: 2008-12-07 18:23+0100\n" +"PO-Revision-Date: 2008-12-10 11:31+0800\n" +"Last-Translator: Ahmad Amran Kapi <r0kawa@gmail.com>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Basepath: ../../../\n" + +#: app_controller.php:93 +msgid "Whoops, not a valid language." +msgstr "Alamak, bukan bahasa yang sah" + +#: app_controller.php:109 +msgid "Please login to continue" +msgstr "Sila login untuk proses seterusnya" + +#: app_controller.php:293 +msgid "All %s matching the term \"%s\"" +msgstr "Semua %s yang sama dengan terma \"%s\"" + +#: controllers/attachments_controller.php:85 +msgid "Attachment controller - no class or foreignKey error." +msgstr "Attachment controller - tiada class atau kesilapan foreignKey " + +#: controllers/attachments_controller.php:110 +msgid "Existing Attachment for %s, id %s updated" +msgstr "Lampiran Sediada untuk %s, id %s dikemaskini" + +#: controllers/attachments_controller.php:112 +msgid "New Attachment for %s, id %s added" +msgstr "Lampiran Baru untuk %s, id %s ditambah" + +#: controllers/attachments_controller.php:137 +msgid "%s with id %s updated" +msgstr "%s untuk id %s dikemaskini" + +#: controllers/attachments_controller.php:140 +msgid "errors in form" +msgstr "kesilapan di dalam borang" + +#: controllers/changes_controller.php:130 +msgid "Recent Changes for %s" +msgstr "Perubahan terkini untuk %s" + +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 +msgid "Recent Changes for all languages" +msgstr "Perubahan terkini untuk semua bahasa" + +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 +msgid "Recent Changes" +msgstr "Perubahan Terkini" + +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 +msgid "by %s" +msgstr "oleh %s" + +#: controllers/changes_controller.php:149 +msgid "restricted to status: %s" +msgstr "terhad kepada status: %s" + +#: controllers/comments_controller.php:84;116 +msgid "Invalid Node." +msgstr "Nod tidak sah." + +#: controllers/comments_controller.php:93 +msgid "Your comment has been added" +msgstr "Komen anda telah ditambah" + +#: controllers/comments_controller.php:96 +msgid "Please correct errors below." +msgstr "Sila betulkan kesalahan dibawah." + +#: controllers/comments_controller.php:120 +msgid "No permissions to see comments for that section" +msgstr "Tiada kebenaran untuk melihat komen bagi seksyen tersebut" + +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 +msgid "Comments for %s" +msgstr "Komen untuk %s" + +#: controllers/comments_controller.php:161 +msgid "Invalid Comment." +msgstr "Komen tidak sah" + +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 +msgid "Recent Comments" +msgstr "Komen Terkini" + +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 +msgid "Recent Comments for all languages" +msgstr "Komen terkini untuk semua bahasa" + +#: controllers/nodes_controller.php:848 +msgid "Invalid Collection" +msgstr "Koleksi tidak sah" + +#: controllers/nodes_controller.php:873;978 +msgid "Thanks for your contribution! Your suggestion has been submitted for review." +msgstr "Terima kasih kepada sumbangan anda! Cadangan anda telah dihantar untuk diperiksa." + +#: controllers/nodes_controller.php:933 +msgid "This function is for comparing different (public) language content" +msgstr "Fungsi ini adalah untuk membandingkan perbezaan (umum) kandungan bahasa" + +#: controllers/revisions_controller.php:616;621;647 +msgid "Only current and previous revisions can be viewed" +msgstr "Hanya semakan yang terkini dan sebelumnya boleh dilihat" + +#: controllers/revisions_controller.php:625 +msgid "Only possible to compare revisions of the same node" +msgstr "Hanya boleh membuat perbandingan dengan nod yang sama" + +#: controllers/revisions_controller.php:651 +msgid "Please login to access this revision" +msgstr "Sila login untuk mengakses semakan" + +#: models/node.php:170 +msgid "Default Title" +msgstr "Tajuk Asas (Default)" + +#: models/node.php:173 +msgid "default_slug" +msgstr "default_slug" + +#: models/node.php:176 +msgid "Default Content" +msgstr "Kandungan Asas (Default)" + +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 +msgid "Login" +msgstr "Login" + +#: plugins/users/views/users/login.ctp:13 +msgid "Forgot your password?" +msgstr "Terlupa kata laluan anda ?" + +#: views/changes/index.ctp:18 +msgid "change submitted by %s, %s" +msgstr "perubahan dihantar oleh %s, %s" + +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 +msgid "accepted" +msgstr "diterima" + +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 +msgid "not accepted" +msgstr "tidak diterima" + +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 +msgid "pending" +msgstr "menunggu pengesahan" + +#: views/changes/index.ctp:35 +msgid "changed from %s to %s by %s, %s" +msgstr "perubahan dari %s kepada %s oleh %s, %s" + +#: views/changes/index.ctp:41 +msgid "submitted by %s" +msgstr "dihantar oleh %s" + +#: views/comments/add.ctp:6 +msgid "Comment: %s" +msgstr "Komen: %s" + +#: views/comments/index.ctp:4 +msgid "Comments: %s" +msgstr "Komen: %s" + +#: views/comments/index.ctp:11 +msgid "No Comments yet!" +msgstr "Tiada komen lagi !" + +#: views/comments/index.ctp:20 +msgid "This page as a feed" +msgstr "Halaman ini sebagai feed" + +#: views/elements/attachments.ctp:2 +msgid "Images/Files associated with this content" +msgstr "Imej/Fail berkaitan dengan kandungan ini" + +#: views/elements/comment.ctp:9 +msgid "unknown" +msgstr "tidak diketahui" + +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "Oleh %s pada %s" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "Oleh %s %s" + +#: views/elements/comment_form.ctp:4 +msgid "Login to add a comment" +msgstr "Login untuk menambah komen" + +#: views/elements/comment_form.ctp:17 +msgid "Comment on %s" +msgstr "Komen pada %s" + +#: views/elements/login_hint.ctp:3 +msgid "Login with your Bakery account" +msgstr "Login dengan akaun Bakery anda" + +#: views/elements/login_hint.ctp:4 +msgid "Not got one? Hop on over to %s and sign up" +msgstr "Masih tiada akaun lagi ? Pergi ke %s dan daftar" + +#: views/elements/node_options.ctp:8 +msgid "Edit" +msgstr "Kemaskini" + +#: views/elements/node_options.ctp:11 +msgid "View just this section" +msgstr "Lihat hanya seksyen ini" + +#: views/elements/node_options.ctp:14 +msgid "Comments (%s)" +msgstr "Komen (%s)" + +#: views/elements/node_options.ctp:19 +msgid "there is a pending change for this section" +msgstr "ada perubahan tertangguh untuk seksyen ini" + +#: views/elements/node_options.ctp:22 +msgid "History" +msgstr "Sejarah" + +#: views/elements/node_options.ctp:32 +msgid "This text may be out of sync with the English version" +msgstr "Teks ini mungkin tidak selaras dengan versi Inggeris" + +#: views/elements/node_options.ctp:39 +msgid "Compare to original content" +msgstr "Bandingkan dengan kandungan asal" + +#: views/elements/paging.ctp:4 +msgid "Page %s" +msgstr "Halaman %s" + +#: views/elements/paging.ctp:5 +msgid "<< previous" +msgstr "<< sebelum" + +#: views/elements/paging.ctp:8 +msgid "Next >>" +msgstr "Seterusnya >>" + +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "Cari" + +#: views/elements/secondary_nav.ctp:6 +msgid "Logged in as %s" +msgstr "Masuk sebagai %s" + +#: views/elements/secondary_nav.ctp:7 +msgid "Logout" +msgstr "Keluar" + +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "Penyumbang Tertinggi" + +#: views/elements/secondary_nav.ctp:28 +msgid "Todo" +msgstr "Tugasan" + +#: views/elements/secondary_nav.ctp:30 +msgid "About CakePHP" +msgstr "Tentang CakePHP" + +#: views/elements/secondary_nav.ctp:31 +msgid "Donate" +msgstr "Derma" + +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 +msgid "All in one page" +msgstr "Semua dalam satu halaman" + +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 +msgid "Suggest a new section here" +msgstr "Cadang seksyen baru di sini" + +#: views/elements/side_menu.ctp:30 +msgid "Options" +msgstr "Pilihan" + +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 +msgid "Table of Contents" +msgstr "Senarai Kandungan" + +#: views/elements/toc.ctp:16 +msgid "see fully expanded table of contents (only)" +msgstr "lihat kandungan penuh " + +#: views/elements/toc.ctp:19 +msgid "Books in " +msgstr "Buku didalam" + +#: views/elements/toc.ctp:21 +msgid "Available collections" +msgstr "Koleksi sedia ada" + +#: views/layouts/default.ctp:38 +msgid "Recent comments" +msgstr "Komen terkini" + +#: views/layouts/default.ctp:51;55 +msgid "My Submissions" +msgstr "Sumbangan Saya" + +#: views/layouts/default.ctp:88 +msgid "Welcome to %s" +msgstr "Selamat datang ke %s" + +#: views/layouts/error.ctp:6;34 +msgid "CakePHP: the rapid development php framework" +msgstr "CakePHP: kerangka pembangunan pantas php" + +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 +msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." +msgstr "Sila periksa panduan yang diberikan sebelum menghantar kepada Cookbook untuk memastikan ianya konsisten." + +#: views/nodes/add.ctp:22 +msgid "Add a new section" +msgstr "Tambah seksyen baru" + +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 +msgid "Show me a preview before submitting" +msgstr "Pratonton kandungan sebelum menghantar" + +#: views/nodes/add.ctp:30 +msgid "under" +msgstr "di bawah" + +#: views/nodes/add.ctp:33 +msgid "after" +msgstr "selepas" + +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 +msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" +msgstr "Kandungan. Kod pada pre tag akan di lepaskan. Penghantar dengan tiada format html akan diformat secara automatik" + +#: views/nodes/add.ctp:44 +msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" +msgstr "Sebagai pilihan, sila terangkan dengan ringkas kenapa anda mencadangkan penambahan (Dalam bahasa Inggeris ) :)" + +#: views/nodes/admin_merge.ctp:18 +msgid "You are sure? Please check the preview" +msgstr "Adakah anda pasti ? Sila pratoton kandungan" + +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 +msgid "Differences" +msgstr "Perbezaan" + +#: views/nodes/edit.ctp:40 +msgid "What is the reason for the edit? (In English Please) :)" +msgstr "Apakah sebab untuk kemaskini ? (Dalam bahasa Inggeris) :)" + +#: views/nodes/history.ctp:6 +msgid "See English edits too" +msgstr "Lihat kemaskini Inggeris juga" + +#: views/nodes/stats.ctp:5 +msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." +msgstr "Berikan ucapan kepada semua yang mendedikasikan masa, peluh dan air mata untuk menulis, menterjemah dan mengemaskini kandungan cookbook" + +#: views/nodes/stats.ctp:7;37 +msgid "Top %s Contributors" +msgstr "Penyumbang %s teratas" + +#: views/nodes/stats.ctp:9;38 +msgid "Last update: %s" +msgstr "Kemaskini terakhir: %s" + +#: views/nodes/stats.ctp:27;63 +msgid "%s (%s current)" +msgstr "%s (%s sekarang)" + +#: views/nodes/stats.ctp:39 +msgid "%s%% translated" +msgstr "%s%% diterjemah" + +#: views/nodes/stats.ctp:41 +msgid "The cookbook needs you! No submissions for this language!" +msgstr "Cookbook memerlukan anda ! Tiada penghantaran untuk bahasa ini !" + +#: views/nodes/stats.ctp:44 +msgid "The cookbook needs you! This language will soon be removed if not updated." +msgstr "Cookbook memerlukan anda! Bahasa ini akan dipadam jika tidak dikemaskini" + +#: views/nodes/stats.ctp:46 +msgid "The cookbook needs you! No updates for one month." +msgstr "Cookbook memerlukan anda! Tiada kemaskini selama sebulan." + +#: views/nodes/todo.ctp:7 +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "Mahu memeriksa atau kemaskini <a href=\"%s\">fail po</a> untuk %s ?" + +#: views/nodes/todo.ctp:10 +msgid "These is no <a href=\"%s\">po file</a> for %s" +msgstr "Tiada <a href=\"%s\">fail po</a> untuk %s" + +#: views/nodes/todo.ctp:13 +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "Sila guna <a href=\"http://www.poedit.net\">PO Edit</a> untuk mengemaskini fail po" + +#: views/nodes/todo.ctp:14 +msgid "These sections either do not have a translation, or the English text has changed since it was translated" +msgstr "Samaada seksyen ini tiada terjemahan atau perkataan Inggeris telah berubah setelah ia diterjemah" + +#: views/nodes/view_all.ctp:40;67 +msgid "See comments for this section" +msgstr "Lihat komen untuk bahagian ini" + +#: views/nodes/view_all.ctp:114;126 +msgid "Change history for %s" +msgstr "Sejarah perubahan untuk %s" + +#: views/revisions/results.ctp:8 +msgid "Search Results" +msgstr "Hasil Carian" + +#: views/revisions/results.ctp:32 +msgid "No results" +msgstr "Tiada hasil" + +#: views/revisions/search.ctp:1 +msgid "Search book.cakephp.org" +msgstr "Cari book.cakephp.org" + diff --git a/locale/per/LC_MESSAGES/default.po b/locale/per/LC_MESSAGES/default.po index 86fa017..7e9cf15 100644 --- a/locale/per/LC_MESSAGES/default.po +++ b/locale/per/LC_MESSAGES/default.po @@ -1,444 +1,488 @@ msgid "" msgstr "" "Project-Id-Version: Cookbook 1.0\n" -"POT-Creation-Date: 2008-11-19 13:34+0100\n" -"PO-Revision-Date: 2008-11-19 13:52+0100\n" -"Last-Translator: Andy Dawson <andydawson76@yahoo.co.uk>\n" +"POT-Creation-Date: 2008-12-04 15:20-0200\n" +"PO-Revision-Date: 2008-12-09 14:38-0300\n" +"Last-Translator: Renan Gonçalves <renan.saddam@gmail.com>\n" "Language-Team: Documentation CakePHP <docs@cakephp.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Persian\n" +"X-Poedit-Basepath: ../../../\n" -#: /app_controller.php:93 +#: app_controller.php:93 msgid "Whoops, not a valid language." msgstr "اوپس! زبان معتبر نیست" -#: /app_controller.php:109 +#: app_controller.php:109 msgid "Please login to continue" msgstr "لطفاً برای ادامه به سیستم وارد شوید" -#: /app_controller.php:293 +#: app_controller.php:293 msgid "All %s matching the term \"%s\"" msgstr "تمام %s هایی که شامل عبارت \"%s\" ستند" -#: /controllers/attachments_controller.php:85 +#: controllers/attachments_controller.php:85 msgid "Attachment controller - no class or foreignKey error." msgstr "کنترل‌کننده‌ی پیوست‌ها - خطای نبود کلاس یا کلیدخارجی" -#: /controllers/attachments_controller.php:110 -#, fuzzy +#: controllers/attachments_controller.php:110 msgid "Existing Attachment for %s, id %s updated" msgstr "پیوست جدید برای %s, شناسه %s اضافه شد" -#: /controllers/attachments_controller.php:112 +#: controllers/attachments_controller.php:112 msgid "New Attachment for %s, id %s added" msgstr "پیوست جدید برای %s, شناسه %s اضافه شد" -#: /controllers/attachments_controller.php:137 +#: controllers/attachments_controller.php:137 msgid "%s with id %s updated" msgstr "%s با شناسه %s به روز شد" -#: /controllers/attachments_controller.php:140 +#: controllers/attachments_controller.php:140 msgid "errors in form" msgstr "خطا در فرم" -#: /controllers/changes_controller.php:130 +#: controllers/changes_controller.php:130 msgid "Recent Changes for %s" msgstr "تغییرات اخیر برای %s" -#: /controllers/changes_controller.php:134 -#: /views/layouts/default.ctp:33 +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 msgid "Recent Changes for all languages" msgstr "تغییرات اخیر برای تمام زبان‌ها" -#: /controllers/changes_controller.php:136 -#: /views/layouts/default.ctp:28 +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 msgid "Recent Changes" msgstr "تغییرات اخیر" -#: /controllers/changes_controller.php:144 -#: /controllers/comments_controller.php:191 +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 msgid "by %s" msgstr "به‌وسیله‌ی %s" -#: /controllers/changes_controller.php:149 +#: controllers/changes_controller.php:149 msgid "restricted to status: %s" msgstr "محدود به وضعیت: %s" -#: /controllers/comments_controller.php:84;116 +#: controllers/comments_controller.php:84;116 msgid "Invalid Node." msgstr "گره نامعتبر." -#: /controllers/comments_controller.php:93 +#: controllers/comments_controller.php:93 msgid "Your comment has been added" msgstr "نظر شما مطرح شد." -#: /controllers/comments_controller.php:96 +#: controllers/comments_controller.php:96 msgid "Please correct errors below." msgstr "لطفاً خطاهای زیر را تصحیح کنید." -#: /controllers/comments_controller.php:120 +#: controllers/comments_controller.php:120 msgid "No permissions to see comments for that section" msgstr "دسترسی‌ای برای نظرات آن بخش وجود ندارد" -#: /controllers/comments_controller.php:128 -#: /views/nodes/view_all.ctp:110;120 +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 msgid "Comments for %s" msgstr "نظرات %s" -#: /controllers/comments_controller.php:161 +#: controllers/comments_controller.php:161 msgid "Invalid Comment." msgstr "نظر نامعتبر" -#: /controllers/comments_controller.php:180 -#: /views/comments/index.ctp:6 +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 msgid "Recent Comments" msgstr "نظرات اخیر" -#: /controllers/comments_controller.php:182 -#: /views/layouts/default.ctp:43 +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 msgid "Recent Comments for all languages" msgstr "نظرات اخیر در تمام زبان‌ها" -#: /controllers/nodes_controller.php:846 +#: controllers/nodes_controller.php:848 msgid "Invalid Collection" msgstr "مجموعه نامعتبر" -#: /controllers/nodes_controller.php:871;976 +#: controllers/nodes_controller.php:873;978 msgid "Thanks for your contribution! Your suggestion has been submitted for review." msgstr "از همکاری‌تان ممنونیم! پیشنهاد شما برای بررسی ثبت گردید." -#: /controllers/nodes_controller.php:931 +#: controllers/nodes_controller.php:933 msgid "This function is for comparing different (public) language content" msgstr "این تابع برای ماقیسه‌ی زبان‌های مختلف (عمومی) است." -#: /controllers/revisions_controller.php:615;620;643 +#: controllers/revisions_controller.php:616;621;647 msgid "Only current and previous revisions can be viewed" msgstr "فقط نسخه‌های فعلی و قبلی می‌توانند نشان داده شوند. " -#: /controllers/revisions_controller.php:624 +#: controllers/revisions_controller.php:625 msgid "Only possible to compare revisions of the same node" -msgstr "فقط مقایسه‌ی نسخه‌هایی ممکن است که از یک گره باشند." +msgstr "" -#: /models/node.php:170 +#: controllers/revisions_controller.php:651 +msgid "Please login to access this revision" +msgstr "" + +#: models/node.php:170 msgid "Default Title" msgstr "عنوان پیش‌فرض" -#: /models/node.php:173 +#: models/node.php:173 msgid "default_slug" msgstr "slug پیش‌فرض" -#: /models/node.php:176 +#: models/node.php:176 msgid "Default Content" -msgstr "محتوای پیش‌فرض" +msgstr "<p>محتوای پیش‌فرض</p>" -#: /plugins/users/views/users/login.ctp:8;20 -#: /views/elements/secondary_nav.ctp:23 +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 msgid "Login" msgstr "" -#: /plugins/users/views/users/login.ctp:13 +#: plugins/users/views/users/login.ctp:13 msgid "Forgot your password?" msgstr "" -#: /views/changes/index.ctp:18 +#: views/changes/index.ctp:18 msgid "change submitted by %s, %s" msgstr "تغییرات توسط %s، %s ثبت گردید" -#: /views/changes/index.ctp:24 -#: /views/changes/rss/index.ctp:14 +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 msgid "accepted" msgstr "قبول شده" -#: /views/changes/index.ctp:27 -#: /views/changes/rss/index.ctp:17 +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 msgid "not accepted" msgstr "رد شده" -#: /views/changes/index.ctp:30 -#: /views/changes/rss/index.ctp:20 +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 msgid "pending" msgstr "معلق" -#: /views/changes/index.ctp:35 +#: views/changes/index.ctp:35 msgid "changed from %s to %s by %s, %s" msgstr "تغییرات از %s تا %s توسط %s، %s" -#: /views/changes/index.ctp:41 +#: views/changes/index.ctp:41 msgid "submitted by %s" msgstr "ثبت کننده: %s" -#: /views/comments/add.ctp:6 +#: views/changes/rss/index.ctp:28 +#, fuzzy +msgid "Submitted by: %s" +msgstr "ثبت کننده: %s" + +#: views/changes/rss/index.ctp:30 +#, fuzzy +msgid "Changed by: %s" +msgstr "تاریخ‌چه ویرایش برای %s" + +#: views/comments/add.ctp:6 msgid "Comment: %s" msgstr "نظر: %s" -#: /views/comments/index.ctp:4 +#: views/comments/index.ctp:4 msgid "Comments: %s" msgstr "نظر: %s" -#: /views/comments/index.ctp:11 +#: views/comments/index.ctp:11 msgid "No Comments yet!" msgstr "هیچ نظری داده نشده!" -#: /views/comments/index.ctp:20 +#: views/comments/index.ctp:20 msgid "This page as a feed" msgstr "این صفحه به عنوان یک منبع" -#: /views/elements/attachments.ctp:2 +#: views/elements/attachments.ctp:2 msgid "Images/Files associated with this content" msgstr "تصاویر/فایل‌های مرتبط با این محتوا" -#: /views/elements/comment.ctp:9 +#: views/elements/comment.ctp:9 msgid "unknown" -msgstr "نامشخص" +msgstr "" -#: /views/elements/comment_form.ctp:4 -#, fuzzy +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "" + +#: views/elements/comment_form.ctp:4 msgid "Login to add a comment" msgstr "با حساب نانوایی (Bakery) خود وارد شوید" -#: /views/elements/comment_form.ctp:17 +#: views/elements/comment_form.ctp:17 msgid "Comment on %s" msgstr "" -#: /views/elements/login_hint.ctp:3 +#: views/elements/login_hint.ctp:3 msgid "Login with your Bakery account" msgstr "با حساب نانوایی (Bakery) خود وارد شوید" -#: /views/elements/login_hint.ctp:4 +#: views/elements/login_hint.ctp:4 msgid "Not got one? Hop on over to %s and sign up" msgstr "هنوز حساب باز نکردید؟ یک سر به %s بزنید و ثبت نام کنید" -#: /views/elements/node_options.ctp:8 +#: views/elements/node_options.ctp:8 msgid "Edit" msgstr "ویرایش" -#: /views/elements/node_options.ctp:11 +#: views/elements/node_options.ctp:11 msgid "View just this section" msgstr "فقط این بخش را نمایش بده" -#: /views/elements/node_options.ctp:14 +#: views/elements/node_options.ctp:14 msgid "Comments (%s)" msgstr "نظرات (%s)" -#: /views/elements/node_options.ctp:19 +#: views/elements/node_options.ctp:19 msgid "there is a pending change for this section" msgstr "یک تغییر برای این مطلب موجود است" -#: /views/elements/node_options.ctp:22 +#: views/elements/node_options.ctp:22 msgid "History" msgstr "" -#: /views/elements/node_options.ctp:32 +#: views/elements/node_options.ctp:32 msgid "This text may be out of sync with the English version" msgstr "این متن احتمالاً با نسخه‌ی انگلیسی همخوان نیست." -#: /views/elements/node_options.ctp:39 +#: views/elements/node_options.ctp:39 msgid "Compare to original content" msgstr "مقایسه با محتوای اصلی" -#: /views/elements/paging.ctp:4 +#: views/elements/paging.ctp:4 msgid "Page %s" msgstr "" -#: /views/elements/paging.ctp:5 +#: views/elements/paging.ctp:5 msgid "<< previous" msgstr " قبلی<<" -#: /views/elements/paging.ctp:8 +#: views/elements/paging.ctp:8 msgid "Next >>" msgstr " بعدی >>" -#: /views/elements/search.ctp:22 -#: /views/elements/search_form.ctp:12 -msgid "Search" -msgstr "جستجو" +#: views/elements/preview.ctp:6 +msgid "How'd you like them apples?" +msgstr "" -#: /views/elements/secondary_nav.ctp:10 -msgid "Top Contributors" +#: views/elements/preview.ctp:7 +msgid "How's that for a slice of fried gold?" msgstr "" -#: /views/elements/secondary_nav.ctp:13 -msgid "todo" +#: views/elements/preview.ctp:8 +msgid "How's that for a slice of cake?" msgstr "" -#: /views/elements/secondary_nav.ctp:17 +#: views/elements/preview.ctp:9 +msgid "Are we done yet?" +msgstr "" + +#: views/elements/preview.ctp:57 +msgid "Save it" +msgstr "" + +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "" + +#: views/elements/secondary_nav.ctp:6 msgid "Logged in as %s" -msgstr "ورود به‌عنوان %s" +msgstr "" -#: /views/elements/secondary_nav.ctp:18 +#: views/elements/secondary_nav.ctp:7 msgid "Logout" -msgstr "خروج" +msgstr "" -#: /views/elements/secondary_nav.ctp:26 +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "" + +#: views/elements/secondary_nav.ctp:28 +msgid "Todo" +msgstr "" + +#: views/elements/secondary_nav.ctp:30 msgid "About CakePHP" msgstr "درباره‌ی کیک پی‌اچ‌پی (CakePHP)" -#: /views/elements/secondary_nav.ctp:27 +#: views/elements/secondary_nav.ctp:31 msgid "Donate" msgstr "کمک مالی" -#: /views/elements/side_menu.ctp:14 -#: /views/nodes/view_all.ctp:95 +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 msgid "All in one page" msgstr "همه با هم" -#: /views/elements/side_menu.ctp:23 -#: /views/nodes/view_all.ctp:102 +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 msgid "Suggest a new section here" msgstr "پیشنهاد بخش جدیدی در اینجا بدهید" -#: /views/elements/side_menu.ctp:30 +#: views/elements/side_menu.ctp:30 msgid "Options" msgstr "" -#: /views/elements/toc.ctp:13 -#: /views/nodes/toc.ctp:5 +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 msgid "Table of Contents" msgstr "فهرست محتوا" -#: /views/elements/toc.ctp:16 +#: views/elements/toc.ctp:16 msgid "see fully expanded table of contents (only)" msgstr "نمایش تمام فهرست محتوا " -#: /views/elements/toc.ctp:19 +#: views/elements/toc.ctp:19 msgid "Books in " msgstr "کتاب‌های موجود در " -#: /views/elements/toc.ctp:21 +#: views/elements/toc.ctp:21 msgid "Available collections" msgstr "مجموعه‌های موجود" -#: /views/layouts/default.ctp:38 +#: views/layouts/default.ctp:38 msgid "Recent comments" msgstr "نظرات اخیر" -#: /views/layouts/default.ctp:51;55 +#: views/layouts/default.ctp:51;55 msgid "My Submissions" msgstr "ارسال‌های من" -#: /views/layouts/default.ctp:88 +#: views/layouts/default.ctp:88 msgid "Welcome to %s" msgstr "به %s خوش آمدید" -#: /views/layouts/error.ctp:6 -msgid "CakePHP: the rapid development php framework:" -msgstr "کیک‌‌پی‌اچ‌پی: توسعه‌ی فرز سکوی پی‌اچ‌پی" - -#: /views/layouts/error.ctp:34 +#: views/layouts/error.ctp:6;34 msgid "CakePHP: the rapid development php framework" msgstr "کیک‌‌پی‌اچ‌پی: توسعه‌ی فرز سکوی پی‌اچ‌پی" -#: /views/nodes/add.ctp:17 -#: /views/nodes/edit.ctp:26 +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." msgstr "لطفاً راهنماهای لازم برای ارسال به کتاب آشپزی را مطالعه کنید." -#: /views/nodes/add.ctp:22 +#: views/nodes/add.ctp:22 msgid "Add a new section" msgstr "ایجاد بخش جدید" -#: /views/nodes/add.ctp:28 -#: /views/nodes/edit.ctp:32 +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 msgid "Show me a preview before submitting" msgstr "قبل از ارسال یک پیشنمایش نشان من بده" -#: /views/nodes/add.ctp:30 +#: views/nodes/add.ctp:30 msgid "under" msgstr "تحت" -#: /views/nodes/add.ctp:33 +#: views/nodes/add.ctp:33 msgid "after" msgstr "بعد از" -#: /views/nodes/add.ctp:39 -#: /views/nodes/edit.ctp:35 +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" msgstr "محتویات. کدها فقط در تگ pre قبول می‌شوند. ارسال‌هایی که ساختار فرمت html ندارند اتوماتیک فرمت می‌شوند." -#: /views/nodes/add.ctp:44 +#: views/nodes/add.ctp:44 msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" msgstr "لطفاً به انگلیسی و به‌طور خلاصه بگویید که چرا دارید این مطلب را اضافه می‌کنید :)" -#: /views/nodes/admin_merge.ctp:18 +#: views/nodes/admin_merge.ctp:18 msgid "You are sure? Please check the preview" msgstr "مطمئنید؟ پیش نمایش را لطفاً ببینید." -#: /views/nodes/compare.ctp:11 -#: /views/revisions/view.ctp:12 +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 msgid "Differences" msgstr "تفاوت‌ها" -#: /views/nodes/edit.ctp:40 +#: views/nodes/edit.ctp:40 msgid "What is the reason for the edit? (In English Please) :)" msgstr "منطق این ویرایش چیست؟ (لطفاً انگلیسی بنویسید) :)" -#: /views/nodes/history.ctp:6 +#: views/nodes/history.ctp:6 msgid "See English edits too" msgstr "ویرایش‌های انگلیسی را هم ببینید." -#: /views/nodes/stats.ctp:5 +#: views/nodes/stats.ctp:5 msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." msgstr "" -#: /views/nodes/stats.ctp:7;37 +#: views/nodes/stats.ctp:7;37 msgid "Top %s Contributors" msgstr "" -#: /views/nodes/stats.ctp:9;38 +#: views/nodes/stats.ctp:9;38 msgid "Last update: %s" msgstr "" -#: /views/nodes/stats.ctp:27;63 +#: views/nodes/stats.ctp:27;63 msgid "%s (%s current)" msgstr "" -#: /views/nodes/stats.ctp:39 +#: views/nodes/stats.ctp:39 msgid "%s%% translated" msgstr "" -#: /views/nodes/stats.ctp:41 +#: views/nodes/stats.ctp:41 msgid "The cookbook needs you! No submissions for this language!" msgstr "" -#: /views/nodes/stats.ctp:44 +#: views/nodes/stats.ctp:44 msgid "The cookbook needs you! This language will soon be removed if not updated." msgstr "" -#: /views/nodes/stats.ctp:46 +#: views/nodes/stats.ctp:46 msgid "The cookbook needs you! No updates for one month." msgstr "" -#: /views/nodes/todo.ctp:7 +#: views/nodes/todo.ctp:7 +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "" + +#: views/nodes/todo.ctp:10 msgid "These is no <a href=\"%s\">po file</a> for %s" msgstr "" -#: /views/nodes/todo.ctp:9 +#: views/nodes/todo.ctp:13 +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "" + +#: views/nodes/todo.ctp:14 msgid "These sections either do not have a translation, or the English text has changed since it was translated" msgstr "" -#: /views/nodes/view_all.ctp:40;67 +#: views/nodes/view_all.ctp:40;67 msgid "See comments for this section" msgstr "نظرات این بخش را ببینید." -#: /views/nodes/view_all.ctp:114;126 +#: views/nodes/view_all.ctp:114;126 msgid "Change history for %s" msgstr "تاریخ‌چه ویرایش برای %s" -#: /views/revisions/results.ctp:8 +#: views/revisions/results.ctp:8 msgid "Search Results" msgstr "نتایج جستجو" -#: /views/revisions/results.ctp:32 +#: views/revisions/results.ctp:32 msgid "No results" msgstr "" -#: /views/revisions/search.ctp:1 +#: views/revisions/search.ctp:1 msgid "Search book.cakephp.org" msgstr "book.cakephp.org را بگردید." -#: /webroot/test.php:75 -msgid "Debug setting does not allow access to this url." -msgstr "Debug setting does not allow access to this url." +#~ msgid "Debug setting does not allow access to this url." +#~ msgstr "Debug setting does not allow access to this url." diff --git a/locale/por/LC_MESSAGES/default.po b/locale/por/LC_MESSAGES/default.po index 4a4f99e..8635806 100644 --- a/locale/por/LC_MESSAGES/default.po +++ b/locale/por/LC_MESSAGES/default.po @@ -25,442 +25,490 @@ msgid "" msgstr "" "Project-Id-Version: \n" +<<<<<<< HEAD:locale/por/LC_MESSAGES/default.po +"POT-Creation-Date: 2008-12-04 15:20-0200\n" +"PO-Revision-Date: 2008-12-09 14:35-0300\n" +======= "POT-Creation-Date: 2008-11-19 13:34+0100\n" -"PO-Revision-Date: 2008-11-19 13:36+0100\n" -"Last-Translator: Andy Dawson <andydawson76@yahoo.co.uk>\n" +"PO-Revision-Date: 2008-11-26 21:27-0300\n" +>>>>>>> 02ad943... Corrected spell of an word:locale/por/LC_MESSAGES/default.po +"Last-Translator: Renan Gonçalves <renan.saddam@gmail.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Basepath: ../../../\n" -#: /app_controller.php:93 +#: app_controller.php:93 msgid "Whoops, not a valid language." -msgstr "Ops, não é uma linguagem válida." +msgstr "Ops, essa não é uma linguagem válida." -#: /app_controller.php:109 +#: app_controller.php:109 msgid "Please login to continue" msgstr "Faça o login para continuar" -#: /app_controller.php:293 +#: app_controller.php:293 msgid "All %s matching the term \"%s\"" msgstr "Todos %s combinam com o termo \"%s\"" -#: /controllers/attachments_controller.php:85 +#: controllers/attachments_controller.php:85 msgid "Attachment controller - no class or foreignKey error." msgstr "Attachment controller - sem class ou erro na chave estrangeira (foreignKey)." -#: /controllers/attachments_controller.php:110 -#, fuzzy +#: controllers/attachments_controller.php:110 msgid "Existing Attachment for %s, id %s updated" -msgstr "Novo Anexo para %s, id %s adicionando" +msgstr "Anexo Existente para %s, id %s atualizado" -#: /controllers/attachments_controller.php:112 +#: controllers/attachments_controller.php:112 msgid "New Attachment for %s, id %s added" msgstr "Novo Anexo para %s, id %s adicionando" -#: /controllers/attachments_controller.php:137 +#: controllers/attachments_controller.php:137 msgid "%s with id %s updated" msgstr "%s com id %s atualizado" -#: /controllers/attachments_controller.php:140 +#: controllers/attachments_controller.php:140 msgid "errors in form" msgstr "erros no formulário" -#: /controllers/changes_controller.php:130 +#: controllers/changes_controller.php:130 msgid "Recent Changes for %s" msgstr "Alterações Recentes em %s" -#: /controllers/changes_controller.php:134 -#: /views/layouts/default.ctp:33 +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 msgid "Recent Changes for all languages" msgstr "Alterações Recentes em todas as linguagens" -#: /controllers/changes_controller.php:136 -#: /views/layouts/default.ctp:28 +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 msgid "Recent Changes" msgstr "Alterações Recentes" -#: /controllers/changes_controller.php:144 -#: /controllers/comments_controller.php:191 +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 msgid "by %s" msgstr "por %s" -#: /controllers/changes_controller.php:149 +#: controllers/changes_controller.php:149 msgid "restricted to status: %s" msgstr "status restrito para: %s" -#: /controllers/comments_controller.php:84;116 +#: controllers/comments_controller.php:84;116 msgid "Invalid Node." msgstr "Nó inválido." -#: /controllers/comments_controller.php:93 +#: controllers/comments_controller.php:93 msgid "Your comment has been added" msgstr "Seu comentário foi adicionando" -#: /controllers/comments_controller.php:96 +#: controllers/comments_controller.php:96 msgid "Please correct errors below." msgstr "Por favor, corrija os erros abaixo." -#: /controllers/comments_controller.php:120 +#: controllers/comments_controller.php:120 msgid "No permissions to see comments for that section" msgstr "Sem permissões para ver os comentários desta seção" -#: /controllers/comments_controller.php:128 -#: /views/nodes/view_all.ctp:110;120 +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 msgid "Comments for %s" msgstr "Comentários de %s" -#: /controllers/comments_controller.php:161 +#: controllers/comments_controller.php:161 msgid "Invalid Comment." msgstr "Comentário Inválido." -#: /controllers/comments_controller.php:180 -#: /views/comments/index.ctp:6 +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 msgid "Recent Comments" msgstr "Comentários Recentes" -#: /controllers/comments_controller.php:182 -#: /views/layouts/default.ctp:43 +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 msgid "Recent Comments for all languages" msgstr "Comentários Recentes em todas as linguagens" -#: /controllers/nodes_controller.php:846 +#: controllers/nodes_controller.php:848 msgid "Invalid Collection" msgstr "Coleção Inválida." -#: /controllers/nodes_controller.php:871;976 +#: controllers/nodes_controller.php:873;978 msgid "Thanks for your contribution! Your suggestion has been submitted for review." msgstr "Obrigado por sua contribuição! Sua sugestão foi enviada para revisão." -#: /controllers/nodes_controller.php:931 +#: controllers/nodes_controller.php:933 msgid "This function is for comparing different (public) language content" msgstr "Essa função é para comparar diferentes (públicos) contéudos entre as linguagens" -#: /controllers/revisions_controller.php:615;620;643 +#: controllers/revisions_controller.php:616;621;647 msgid "Only current and previous revisions can be viewed" -msgstr "Apenas a revisão anterior e a corrente podem ser vistas" +msgstr "Apenas a revisão anterior e a atual podem ser vistas" -#: /controllers/revisions_controller.php:624 +#: controllers/revisions_controller.php:625 msgid "Only possible to compare revisions of the same node" msgstr "Só é possível comparar revisões do mesmo nó" -#: /models/node.php:170 +#: controllers/revisions_controller.php:651 +msgid "Please login to access this revision" +msgstr "Por favor faça o login para acessar esta revisão" + +#: models/node.php:170 msgid "Default Title" msgstr "Título Padrão" -#: /models/node.php:173 +#: models/node.php:173 msgid "default_slug" msgstr "slug_padrao" -#: /models/node.php:176 +#: models/node.php:176 msgid "Default Content" msgstr "Conteúdo Padrão" -#: /plugins/users/views/users/login.ctp:8;20 -#: /views/elements/secondary_nav.ctp:23 +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 msgid "Login" msgstr "Login" -#: /plugins/users/views/users/login.ctp:13 +#: plugins/users/views/users/login.ctp:13 msgid "Forgot your password?" msgstr "Esqueceu a senha?" -#: /views/changes/index.ctp:18 +#: views/changes/index.ctp:18 msgid "change submitted by %s, %s" msgstr "alteração enviada por %s, %s" -#: /views/changes/index.ctp:24 -#: /views/changes/rss/index.ctp:14 +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 msgid "accepted" msgstr "aprovado" -#: /views/changes/index.ctp:27 -#: /views/changes/rss/index.ctp:17 +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 msgid "not accepted" msgstr "não aprovado" -#: /views/changes/index.ctp:30 -#: /views/changes/rss/index.ctp:20 +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 msgid "pending" msgstr "pendente" -#: /views/changes/index.ctp:35 +#: views/changes/index.ctp:35 msgid "changed from %s to %s by %s, %s" msgstr "alterado de %s para %s por %s, %s" -#: /views/changes/index.ctp:41 +#: views/changes/index.ctp:41 msgid "submitted by %s" msgstr "enviado por %s" -#: /views/comments/add.ctp:6 +#: views/changes/rss/index.ctp:28 +msgid "Submitted by: %s" +msgstr "Enviado por: %s" + +#: views/changes/rss/index.ctp:30 +msgid "Changed by: %s" +msgstr "Alterado por: %s" + +#: views/comments/add.ctp:6 msgid "Comment: %s" msgstr "Comentário: %s" -#: /views/comments/index.ctp:4 +#: views/comments/index.ctp:4 msgid "Comments: %s" msgstr "Comentários: %s" -#: /views/comments/index.ctp:11 +#: views/comments/index.ctp:11 msgid "No Comments yet!" msgstr "Sem comentários ainda!" -#: /views/comments/index.ctp:20 +#: views/comments/index.ctp:20 msgid "This page as a feed" msgstr "Essa página é um feed" -#: /views/elements/attachments.ctp:2 +#: views/elements/attachments.ctp:2 msgid "Images/Files associated with this content" msgstr "Imagens/Arquivos associados com este conteúdo" -#: /views/elements/comment.ctp:9 +#: views/elements/comment.ctp:9 msgid "unknown" msgstr "desconhecido" -#: /views/elements/comment_form.ctp:4 +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "Por %s em %s" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "Por %s %s" + +#: views/elements/comment_form.ctp:4 msgid "Login to add a comment" msgstr "Faça o login para adicionar um comentário" -#: /views/elements/comment_form.ctp:17 +#: views/elements/comment_form.ctp:17 msgid "Comment on %s" msgstr "Comentário em %s" -#: /views/elements/login_hint.ctp:3 +#: views/elements/login_hint.ctp:3 msgid "Login with your Bakery account" msgstr "Faça o login com sua conta do Bakery" -#: /views/elements/login_hint.ctp:4 +#: views/elements/login_hint.ctp:4 msgid "Not got one? Hop on over to %s and sign up" msgstr "Não pegou? Pule para %s e registre-se" -#: /views/elements/node_options.ctp:8 +#: views/elements/node_options.ctp:8 msgid "Edit" msgstr "Editar" -#: /views/elements/node_options.ctp:11 +#: views/elements/node_options.ctp:11 msgid "View just this section" -msgstr "Visualizar apenas este seção" +msgstr "Visualizar apenas esta seção" -#: /views/elements/node_options.ctp:14 +#: views/elements/node_options.ctp:14 msgid "Comments (%s)" msgstr "Comentários (%s)" -#: /views/elements/node_options.ctp:19 +#: views/elements/node_options.ctp:19 msgid "there is a pending change for this section" msgstr "existe uma alteração pendente para esta seção" -#: /views/elements/node_options.ctp:22 +#: views/elements/node_options.ctp:22 msgid "History" msgstr "Histórico" -#: /views/elements/node_options.ctp:32 +#: views/elements/node_options.ctp:32 msgid "This text may be out of sync with the English version" -msgstr "Talve esse texto esteja desatualizado com a versão em Inglês" +msgstr "Talvez este texto esteja desatualizado com a versão em Inglês" -#: /views/elements/node_options.ctp:39 +#: views/elements/node_options.ctp:39 msgid "Compare to original content" msgstr "Compare com o conteúdo original" -#: /views/elements/paging.ctp:4 +#: views/elements/paging.ctp:4 msgid "Page %s" msgstr "Página %s" -#: /views/elements/paging.ctp:5 +#: views/elements/paging.ctp:5 msgid "<< previous" msgstr "<< anterior" -#: /views/elements/paging.ctp:8 +#: views/elements/paging.ctp:8 msgid "Next >>" msgstr "Próxima >>" -#: /views/elements/search.ctp:22 -#: /views/elements/search_form.ctp:12 -msgid "Search" -msgstr "Busca" +#: views/elements/preview.ctp:6 +msgid "How'd you like them apples?" +msgstr "Como você gosta das maças?" -#: /views/elements/secondary_nav.ctp:10 -msgid "Top Contributors" -msgstr "Top Colaboradores" +#: views/elements/preview.ctp:7 +msgid "How's that for a slice of fried gold?" +msgstr "Como vai este pedacinho de ouro?" -#: /views/elements/secondary_nav.ctp:13 -msgid "todo" -msgstr "" +#: views/elements/preview.ctp:8 +msgid "How's that for a slice of cake?" +msgstr "Como vai este pedaço de bolo?" + +#: views/elements/preview.ctp:9 +msgid "Are we done yet?" +msgstr "Nós já terminamos?" + +#: views/elements/preview.ctp:57 +msgid "Save it" +msgstr "Salve" -#: /views/elements/secondary_nav.ctp:17 +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "Busca" + +#: views/elements/secondary_nav.ctp:6 msgid "Logged in as %s" msgstr "Logado como %s" -#: /views/elements/secondary_nav.ctp:18 +#: views/elements/secondary_nav.ctp:7 msgid "Logout" -msgstr "Logout" +msgstr "Sair" -#: /views/elements/secondary_nav.ctp:26 +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "Top Colaboradores" + +#: views/elements/secondary_nav.ctp:28 +msgid "Todo" +msgstr "Todo" + +#: views/elements/secondary_nav.ctp:30 msgid "About CakePHP" msgstr "Sobre o CakePHP" -#: /views/elements/secondary_nav.ctp:27 +#: views/elements/secondary_nav.ctp:31 msgid "Donate" msgstr "Doar" -#: /views/elements/side_menu.ctp:14 -#: /views/nodes/view_all.ctp:95 +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 msgid "All in one page" msgstr "Tudo em uma página" -#: /views/elements/side_menu.ctp:23 -#: /views/nodes/view_all.ctp:102 +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 msgid "Suggest a new section here" msgstr "Sugira uma nova seção aqui" -#: /views/elements/side_menu.ctp:30 +#: views/elements/side_menu.ctp:30 msgid "Options" msgstr "Opções" -#: /views/elements/toc.ctp:13 -#: /views/nodes/toc.ctp:5 +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 msgid "Table of Contents" msgstr "Tabela de Conteúdo" -#: /views/elements/toc.ctp:16 +#: views/elements/toc.ctp:16 msgid "see fully expanded table of contents (only)" msgstr "veja a tabela de conteúdo totalmente expandida (apenas)" -#: /views/elements/toc.ctp:19 +#: views/elements/toc.ctp:19 msgid "Books in " msgstr "Livros em " -#: /views/elements/toc.ctp:21 +#: views/elements/toc.ctp:21 msgid "Available collections" msgstr "Coleções disponíveis" -#: /views/layouts/default.ctp:38 +#: views/layouts/default.ctp:38 msgid "Recent comments" msgstr "Comentários recentes" -#: /views/layouts/default.ctp:51;55 +#: views/layouts/default.ctp:51;55 msgid "My Submissions" msgstr "Minhas Contribuições" -#: /views/layouts/default.ctp:88 +#: views/layouts/default.ctp:88 msgid "Welcome to %s" msgstr "Bem-vindo ao Cookbook" -#: /views/layouts/error.ctp:6 -msgid "CakePHP: the rapid development php framework:" -msgstr "CakePHP: o framework de desenvolvimento rápido para php:" - -#: /views/layouts/error.ctp:34 +#: views/layouts/error.ctp:6;34 msgid "CakePHP: the rapid development php framework" msgstr "CakePHP: o framework de desenvolvimento rápido para php" -#: /views/nodes/add.ctp:17 -#: /views/nodes/edit.ctp:26 +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." msgstr "Por favor, reveja o guia de como contribuir com o CookBook para garantir consistência" -#: /views/nodes/add.ctp:22 +#: views/nodes/add.ctp:22 msgid "Add a new section" msgstr "Adicionar uma nova seção" -#: /views/nodes/add.ctp:28 -#: /views/nodes/edit.ctp:32 +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 msgid "Show me a preview before submitting" msgstr "Mostre-me um preview antes de enviar" -#: /views/nodes/add.ctp:30 +#: views/nodes/add.ctp:30 msgid "under" msgstr "em" -#: /views/nodes/add.ctp:33 +#: views/nodes/add.ctp:33 msgid "after" msgstr "depois" -#: /views/nodes/add.ctp:39 -#: /views/nodes/edit.ctp:35 +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" msgstr "Conteúdos. Código dentro das tag pre vão ser escapadas. Contribuições sem formatação html vão ser formatadas automaticamente" -#: /views/nodes/add.ctp:44 +#: views/nodes/add.ctp:44 msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" msgstr "Opcionalmente me explique resumidamente porque você está propondo esta adicão (Em Inglês por favor) :)" -#: /views/nodes/admin_merge.ctp:18 +#: views/nodes/admin_merge.ctp:18 msgid "You are sure? Please check the preview" -msgstr "Você tem certeza? Por favor verifique o preview" +msgstr "Você tem certeza? Por favor verifique a pre-visualização" -#: /views/nodes/compare.ctp:11 -#: /views/revisions/view.ctp:12 +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 msgid "Differences" msgstr "Diferenças" -#: /views/nodes/edit.ctp:40 +#: views/nodes/edit.ctp:40 msgid "What is the reason for the edit? (In English Please) :)" -msgstr "Qual é a razão dessa alteração? (Em Inglês por favor) :)" +msgstr "Qual é a razão desta alteração? (Em Inglês por favor) :)" -#: /views/nodes/history.ctp:6 +#: views/nodes/history.ctp:6 msgid "See English edits too" msgstr "Ver alterações em Inglês também" -#: /views/nodes/stats.ctp:5 +#: views/nodes/stats.ctp:5 msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." -msgstr "" +msgstr "Aqui vai um grito para os que têm dedicado tempo, suor e lágrimas para escrever, traduzir e editar o conteúdo do cookcook." -#: /views/nodes/stats.ctp:7;37 +#: views/nodes/stats.ctp:7;37 msgid "Top %s Contributors" msgstr "Top Colaboradores %s" -#: /views/nodes/stats.ctp:9;38 +#: views/nodes/stats.ctp:9;38 msgid "Last update: %s" -msgstr "" +msgstr "Última atualização: %s" -#: /views/nodes/stats.ctp:27;63 +#: views/nodes/stats.ctp:27;63 msgid "%s (%s current)" -msgstr "" +msgstr "%s (%s atual)" -#: /views/nodes/stats.ctp:39 +#: views/nodes/stats.ctp:39 msgid "%s%% translated" -msgstr "" +msgstr "%s%% traduzido" -#: /views/nodes/stats.ctp:41 +#: views/nodes/stats.ctp:41 msgid "The cookbook needs you! No submissions for this language!" -msgstr "" +msgstr "O cookbook precisa de você! Nada foi enviada para esta linguagem!" -#: /views/nodes/stats.ctp:44 +#: views/nodes/stats.ctp:44 msgid "The cookbook needs you! This language will soon be removed if not updated." -msgstr "" +msgstr "O cookbook precisa de você! Esta linguagem vai ser removido em breve caso não seja atualizada." -#: /views/nodes/stats.ctp:46 +#: views/nodes/stats.ctp:46 msgid "The cookbook needs you! No updates for one month." -msgstr "" +msgstr "O cookbook precisa de você! Nada foi atualizado há um mês." + +#: views/nodes/todo.ctp:7 +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "Quer verificar ou atualizar o <a href=\"%s\">po file</a> para %s?" -#: /views/nodes/todo.ctp:7 +#: views/nodes/todo.ctp:10 msgid "These is no <a href=\"%s\">po file</a> for %s" -msgstr "" +msgstr "Não há <a href=\"%s\">po file</a> para %s" + +#: views/nodes/todo.ctp:13 +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "Por favor use <a href=\"http://www.poedit.net\">Po Edit</a> para editar os arquivos po" -#: /views/nodes/todo.ctp:9 +#: views/nodes/todo.ctp:14 msgid "These sections either do not have a translation, or the English text has changed since it was translated" -msgstr "" +msgstr "Estas seções não têm uma tradução ou o texto em Inglês mudou desde que foi traduzido" -#: /views/nodes/view_all.ctp:40;67 +#: views/nodes/view_all.ctp:40;67 msgid "See comments for this section" -msgstr "Ver comentários dessa seção" +msgstr "Ver comentários desta seção" -#: /views/nodes/view_all.ctp:114;126 +#: views/nodes/view_all.ctp:114;126 msgid "Change history for %s" msgstr "Histórico de alterações para %s" -#: /views/revisions/results.ctp:8 +#: views/revisions/results.ctp:8 msgid "Search Results" msgstr "Resultados da Busca" -#: /views/revisions/results.ctp:32 +#: views/revisions/results.ctp:32 msgid "No results" msgstr "Sem resultados" -#: /views/revisions/search.ctp:1 +#: views/revisions/search.ctp:1 msgid "Search book.cakephp.org" msgstr "Busque book.cakephp.org" -#: /webroot/test.php:75 -msgid "Debug setting does not allow access to this url." -msgstr "" +#~ msgid "CakePHP: the rapid development php framework:" +#~ msgstr "CakePHP: o framework de desenvolvimento rápido para php:" diff --git a/locale/spa/LC_MESSAGES/default.po b/locale/spa/LC_MESSAGES/default.po index 5984203..d26cd4c 100644 --- a/locale/spa/LC_MESSAGES/default.po +++ b/locale/spa/LC_MESSAGES/default.po @@ -26,441 +26,490 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2008-11-19 13:34+0100\n" -"PO-Revision-Date: 2008-11-19 13:38+0100\n" -"Last-Translator: Andy Dawson <andydawson76@yahoo.co.uk>\n" +"POT-Creation-Date: 2008-12-04 15:20-0200\n" +"PO-Revision-Date: 2008-12-09 14:38-0300\n" +"Last-Translator: Renan Gonçalves <renan.saddam@gmail.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Basepath: ../../../\n" -#: /app_controller.php:93 +#: app_controller.php:93 msgid "Whoops, not a valid language." msgstr "Lo siento, no es un lenguaje válido" -#: /app_controller.php:109 +#: app_controller.php:109 msgid "Please login to continue" msgstr "Por favor inicia la sesión para continuar" -#: /app_controller.php:293 +#: app_controller.php:293 msgid "All %s matching the term \"%s\"" msgstr "Todos los %s que concuerdan con el término \"%s\"" -#: /controllers/attachments_controller.php:85 +#: controllers/attachments_controller.php:85 msgid "Attachment controller - no class or foreignKey error." msgstr "Attachment controller - no existe la clase o error de foreingKey" -#: /controllers/attachments_controller.php:110 +#: controllers/attachments_controller.php:110 msgid "Existing Attachment for %s, id %s updated" msgstr "Adjunto para %s, id %s actualizado" -#: /controllers/attachments_controller.php:112 +#: controllers/attachments_controller.php:112 msgid "New Attachment for %s, id %s added" msgstr "Nuevo Adjunto para %s, id %s agregado" -#: /controllers/attachments_controller.php:137 +#: controllers/attachments_controller.php:137 msgid "%s with id %s updated" msgstr "%s con id %s actualizado" -#: /controllers/attachments_controller.php:140 +#: controllers/attachments_controller.php:140 msgid "errors in form" msgstr "errores en el formulario" -#: /controllers/changes_controller.php:130 +#: controllers/changes_controller.php:130 msgid "Recent Changes for %s" msgstr "Cambios recientes para %s" -#: /controllers/changes_controller.php:134 -#: /views/layouts/default.ctp:33 +#: controllers/changes_controller.php:134 +#: views/layouts/default.ctp:33 msgid "Recent Changes for all languages" msgstr "Cambios recientes para todos los lenguajes" -#: /controllers/changes_controller.php:136 -#: /views/layouts/default.ctp:28 +#: controllers/changes_controller.php:136 +#: views/layouts/default.ctp:28 msgid "Recent Changes" msgstr "Cambios Recientes" -#: /controllers/changes_controller.php:144 -#: /controllers/comments_controller.php:191 +#: controllers/changes_controller.php:144 +#: controllers/comments_controller.php:191 msgid "by %s" msgstr "por %s" -#: /controllers/changes_controller.php:149 +#: controllers/changes_controller.php:149 msgid "restricted to status: %s" msgstr "restringido al estado: %s" -#: /controllers/comments_controller.php:84;116 +#: controllers/comments_controller.php:84;116 msgid "Invalid Node." msgstr "Nodo inválido" -#: /controllers/comments_controller.php:93 +#: controllers/comments_controller.php:93 msgid "Your comment has been added" msgstr "Tu comentario ha sigo agregado" -#: /controllers/comments_controller.php:96 +#: controllers/comments_controller.php:96 msgid "Please correct errors below." msgstr "Por favor corrija los siguientes errores" -#: /controllers/comments_controller.php:120 +#: controllers/comments_controller.php:120 msgid "No permissions to see comments for that section" msgstr "No tiene privilegios para ver los comentarios de esa sección" -#: /controllers/comments_controller.php:128 -#: /views/nodes/view_all.ctp:110;120 +#: controllers/comments_controller.php:128 +#: views/nodes/view_all.ctp:110;120 msgid "Comments for %s" msgstr "Comentarios para %s" -#: /controllers/comments_controller.php:161 +#: controllers/comments_controller.php:161 msgid "Invalid Comment." msgstr "Comentario inválido" -#: /controllers/comments_controller.php:180 -#: /views/comments/index.ctp:6 +#: controllers/comments_controller.php:180 +#: views/comments/index.ctp:6 msgid "Recent Comments" msgstr "Comentarios Recientes" -#: /controllers/comments_controller.php:182 -#: /views/layouts/default.ctp:43 +#: controllers/comments_controller.php:182 +#: views/layouts/default.ctp:43 msgid "Recent Comments for all languages" msgstr "Comentarios Recientes para todos los lenguajes" -#: /controllers/nodes_controller.php:846 +#: controllers/nodes_controller.php:848 msgid "Invalid Collection" msgstr "Colección inválida" -#: /controllers/nodes_controller.php:871;976 +#: controllers/nodes_controller.php:873;978 msgid "Thanks for your contribution! Your suggestion has been submitted for review." msgstr "¡Gracias por tu contribución! Tu sugerencia ha sido enviada para revisarse" -#: /controllers/nodes_controller.php:931 +#: controllers/nodes_controller.php:933 msgid "This function is for comparing different (public) language content" msgstr "Esta función es para comparar contenidos públicos de lenguajes distintos" -#: /controllers/revisions_controller.php:615;620;643 +#: controllers/revisions_controller.php:616;621;647 msgid "Only current and previous revisions can be viewed" msgstr "Solo la versión actual y la anterior pueden ser vistas" -#: /controllers/revisions_controller.php:624 +#: controllers/revisions_controller.php:625 msgid "Only possible to compare revisions of the same node" msgstr "Sólo es posible comparar revisiones del mismo nodo" -#: /models/node.php:170 +#: controllers/revisions_controller.php:651 +#, fuzzy +msgid "Please login to access this revision" +msgstr "Por favor inicia la sesión para continuar" + +#: models/node.php:170 msgid "Default Title" msgstr "Titulo por Omisión" -#: /models/node.php:173 +#: models/node.php:173 msgid "default_slug" msgstr "default_slug" -#: /models/node.php:176 +#: models/node.php:176 msgid "Default Content" msgstr "Contenido por omisión" -#: /plugins/users/views/users/login.ctp:8;20 -#: /views/elements/secondary_nav.ctp:23 +#: plugins/users/views/users/login.ctp:8;20 +#: views/elements/secondary_nav.ctp:12 msgid "Login" msgstr "Iniciar sesión" -#: /plugins/users/views/users/login.ctp:13 +#: plugins/users/views/users/login.ctp:13 msgid "Forgot your password?" msgstr "¿Olbidaste tu contraseña?" -#: /views/changes/index.ctp:18 +#: views/changes/index.ctp:18 msgid "change submitted by %s, %s" msgstr "cambio enviado por %s, %s" -#: /views/changes/index.ctp:24 -#: /views/changes/rss/index.ctp:14 +#: views/changes/index.ctp:24 +#: views/changes/rss/index.ctp:14 msgid "accepted" msgstr "aceptado" -#: /views/changes/index.ctp:27 -#: /views/changes/rss/index.ctp:17 +#: views/changes/index.ctp:27 +#: views/changes/rss/index.ctp:17 msgid "not accepted" msgstr "no aceptado" -#: /views/changes/index.ctp:30 -#: /views/changes/rss/index.ctp:20 +#: views/changes/index.ctp:30 +#: views/changes/rss/index.ctp:20 msgid "pending" msgstr "pendiente" -#: /views/changes/index.ctp:35 +#: views/changes/index.ctp:35 msgid "changed from %s to %s by %s, %s" msgstr "cambiado de %s a %s por %s, %s" -#: /views/changes/index.ctp:41 +#: views/changes/index.ctp:41 msgid "submitted by %s" msgstr "enviado por %s" -#: /views/comments/add.ctp:6 +#: views/changes/rss/index.ctp:28 +#, fuzzy +msgid "Submitted by: %s" +msgstr "enviado por %s" + +#: views/changes/rss/index.ctp:30 +#, fuzzy +msgid "Changed by: %s" +msgstr "Historia de cambios para %s" + +#: views/comments/add.ctp:6 msgid "Comment: %s" msgstr "Commentario: %s" -#: /views/comments/index.ctp:4 +#: views/comments/index.ctp:4 msgid "Comments: %s" msgstr "Comentarios: %s" -#: /views/comments/index.ctp:11 +#: views/comments/index.ctp:11 msgid "No Comments yet!" msgstr "¡Aún no hay comentarios!" -#: /views/comments/index.ctp:20 +#: views/comments/index.ctp:20 msgid "This page as a feed" msgstr "Esta página tiene un canal" -#: /views/elements/attachments.ctp:2 +#: views/elements/attachments.ctp:2 msgid "Images/Files associated with this content" msgstr "Imagenes/Archivos asociados a este contenido" -#: /views/elements/comment.ctp:9 +#: views/elements/comment.ctp:9 msgid "unknown" msgstr "desconocido" -#: /views/elements/comment_form.ctp:4 +#: views/elements/comment.ctp:16 +msgid "By %s on %s" +msgstr "Por %s %s" + +#: views/elements/comment.ctp:18 +msgid "By %s %s" +msgstr "por %s %s" + +#: views/elements/comment_form.ctp:4 msgid "Login to add a comment" msgstr "Inicia sesión para añadir un comentario" -#: /views/elements/comment_form.ctp:17 +#: views/elements/comment_form.ctp:17 msgid "Comment on %s" msgstr "Comentarios para %s" -#: /views/elements/login_hint.ctp:3 +#: views/elements/login_hint.ctp:3 msgid "Login with your Bakery account" msgstr "Inicia sesión con tu cuenta Bakery" -#: /views/elements/login_hint.ctp:4 +#: views/elements/login_hint.ctp:4 msgid "Not got one? Hop on over to %s and sign up" msgstr "¿No tienes? Ve a %s e inscríbete" -#: /views/elements/node_options.ctp:8 +#: views/elements/node_options.ctp:8 msgid "Edit" msgstr "Editar" -#: /views/elements/node_options.ctp:11 +#: views/elements/node_options.ctp:11 msgid "View just this section" msgstr "Ver sólo esta sección" -#: /views/elements/node_options.ctp:14 +#: views/elements/node_options.ctp:14 msgid "Comments (%s)" msgstr "Comentarios (%s)" -#: /views/elements/node_options.ctp:19 +#: views/elements/node_options.ctp:19 msgid "there is a pending change for this section" msgstr "Hay un cambio pendiente para esta sección" -#: /views/elements/node_options.ctp:22 +#: views/elements/node_options.ctp:22 msgid "History" msgstr "Historia" -#: /views/elements/node_options.ctp:32 +#: views/elements/node_options.ctp:32 msgid "This text may be out of sync with the English version" msgstr "Este tecto puede diverger de la versión original en inglés" -#: /views/elements/node_options.ctp:39 +#: views/elements/node_options.ctp:39 msgid "Compare to original content" msgstr "Comparar con el contenido original" -#: /views/elements/paging.ctp:4 +#: views/elements/paging.ctp:4 msgid "Page %s" msgstr "Página %s" -#: /views/elements/paging.ctp:5 +#: views/elements/paging.ctp:5 msgid "<< previous" msgstr "<< anterior" -#: /views/elements/paging.ctp:8 +#: views/elements/paging.ctp:8 msgid "Next >>" msgstr "Siguiente >>" -#: /views/elements/search.ctp:22 -#: /views/elements/search_form.ctp:12 -msgid "Search" -msgstr "Buscar" +#: views/elements/preview.ctp:6 +msgid "How'd you like them apples?" +msgstr "" -#: /views/elements/secondary_nav.ctp:10 -msgid "Top Contributors" -msgstr "Principales contribuidores" +#: views/elements/preview.ctp:7 +msgid "How's that for a slice of fried gold?" +msgstr "" + +#: views/elements/preview.ctp:8 +msgid "How's that for a slice of cake?" +msgstr "" -#: /views/elements/secondary_nav.ctp:13 -msgid "todo" +#: views/elements/preview.ctp:9 +msgid "Are we done yet?" msgstr "" -#: /views/elements/secondary_nav.ctp:17 +#: views/elements/preview.ctp:57 +msgid "Save it" +msgstr "" + +#: views/elements/search.ctp:22 +#: views/elements/search_form.ctp:12 +msgid "Search" +msgstr "Buscar" + +#: views/elements/secondary_nav.ctp:6 msgid "Logged in as %s" msgstr "Registrado como %s" -#: /views/elements/secondary_nav.ctp:18 +#: views/elements/secondary_nav.ctp:7 msgid "Logout" msgstr "Cerrar sesión" -#: /views/elements/secondary_nav.ctp:26 +#: views/elements/secondary_nav.ctp:21 +msgid "Top Contributors" +msgstr "Principales contribuidores" + +#: views/elements/secondary_nav.ctp:28 +msgid "Todo" +msgstr "" + +#: views/elements/secondary_nav.ctp:30 msgid "About CakePHP" msgstr "Acerca de CakePHP" -#: /views/elements/secondary_nav.ctp:27 +#: views/elements/secondary_nav.ctp:31 msgid "Donate" msgstr "Donar" -#: /views/elements/side_menu.ctp:14 -#: /views/nodes/view_all.ctp:95 +#: views/elements/side_menu.ctp:14 +#: views/nodes/view_all.ctp:95 msgid "All in one page" msgstr "Todo en una página" -#: /views/elements/side_menu.ctp:23 -#: /views/nodes/view_all.ctp:102 +#: views/elements/side_menu.ctp:23 +#: views/nodes/view_all.ctp:102 msgid "Suggest a new section here" msgstr "Sugerir una nueva sessión aquí" -#: /views/elements/side_menu.ctp:30 +#: views/elements/side_menu.ctp:30 msgid "Options" msgstr "opciones" -#: /views/elements/toc.ctp:13 -#: /views/nodes/toc.ctp:5 +#: views/elements/toc.ctp:13 +#: views/nodes/toc.ctp:5 msgid "Table of Contents" msgstr "Tabla de contenidos" -#: /views/elements/toc.ctp:16 +#: views/elements/toc.ctp:16 msgid "see fully expanded table of contents (only)" msgstr "ver únicamente la tabla de contenidos expandida" -#: /views/elements/toc.ctp:19 +#: views/elements/toc.ctp:19 msgid "Books in " msgstr "Libros en" -#: /views/elements/toc.ctp:21 +#: views/elements/toc.ctp:21 msgid "Available collections" msgstr "Colecciones disponibles" -#: /views/layouts/default.ctp:38 +#: views/layouts/default.ctp:38 msgid "Recent comments" msgstr "Comentarios recientes" -#: /views/layouts/default.ctp:51;55 +#: views/layouts/default.ctp:51;55 msgid "My Submissions" msgstr "Mis contribuciones" -#: /views/layouts/default.ctp:88 +#: views/layouts/default.ctp:88 msgid "Welcome to %s" msgstr "Bienvenido a %s" -#: /views/layouts/error.ctp:6 -msgid "CakePHP: the rapid development php framework:" -msgstr "CakePHP: el framework de desarrollo rápido" - -#: /views/layouts/error.ctp:34 +#: views/layouts/error.ctp:6;34 msgid "CakePHP: the rapid development php framework" msgstr "CakePHP: el framework de desarrollo rápido" -#: /views/nodes/add.ctp:17 -#: /views/nodes/edit.ctp:26 +#: views/nodes/add.ctp:17 +#: views/nodes/edit.ctp:26 msgid "Please review the guidelines for submitting to the Cookbook to ensure consistency." msgstr "Pro favor revisa las recomendacines sobre como contribuir con el cookbook" -#: /views/nodes/add.ctp:22 +#: views/nodes/add.ctp:22 msgid "Add a new section" msgstr "Agregar nueva sección" -#: /views/nodes/add.ctp:28 -#: /views/nodes/edit.ctp:32 +#: views/nodes/add.ctp:28 +#: views/nodes/edit.ctp:32 msgid "Show me a preview before submitting" msgstr "Muéstrame una vista previa antes de enviar" -#: /views/nodes/add.ctp:30 +#: views/nodes/add.ctp:30 msgid "under" msgstr "debajo de" -#: /views/nodes/add.ctp:33 +#: views/nodes/add.ctp:33 msgid "after" msgstr "despues de" -#: /views/nodes/add.ctp:39 -#: /views/nodes/edit.ctp:35 +#: views/nodes/add.ctp:39 +#: views/nodes/edit.ctp:35 msgid "Contents. Code in pre tags will be escaped. Submissions with no html formatting will be formatted automatically" msgstr "Contenido. Código en etiquetas pre será escapado. Contribuciones sin formato html seran formateadas automáticamente" -#: /views/nodes/add.ctp:44 +#: views/nodes/add.ctp:44 msgid "Optionally explain in brief why you are proposing this addition (In English Please) :)" msgstr "Opcionalmente explica por qué propones esta adición, se breve. (En inglés por favor ) :)" -#: /views/nodes/admin_merge.ctp:18 +#: views/nodes/admin_merge.ctp:18 msgid "You are sure? Please check the preview" msgstr "¿Estás seguro? Por favor verifica." -#: /views/nodes/compare.ctp:11 -#: /views/revisions/view.ctp:12 +#: views/nodes/compare.ctp:11 +#: views/revisions/view.ctp:12 msgid "Differences" msgstr "Diferencias" -#: /views/nodes/edit.ctp:40 +#: views/nodes/edit.ctp:40 msgid "What is the reason for the edit? (In English Please) :)" msgstr "¿Cuál es la razón para este cambio? (En inglés por favor) :)" -#: /views/nodes/history.ctp:6 +#: views/nodes/history.ctp:6 msgid "See English edits too" msgstr "Ver los cambios en inglés también" -#: /views/nodes/stats.ctp:5 +#: views/nodes/stats.ctp:5 msgid "Here's a shout out to those who have dedicated time, sweat and tears to write, translate and edit the cookbook contents." msgstr "" -#: /views/nodes/stats.ctp:7;37 +#: views/nodes/stats.ctp:7;37 msgid "Top %s Contributors" msgstr "Principales contribuidores %s" -#: /views/nodes/stats.ctp:9;38 +#: views/nodes/stats.ctp:9;38 msgid "Last update: %s" msgstr "Last update: %s" -#: /views/nodes/stats.ctp:27;63 +#: views/nodes/stats.ctp:27;63 msgid "%s (%s current)" msgstr "%s (%s current)" -#: /views/nodes/stats.ctp:39 +#: views/nodes/stats.ctp:39 msgid "%s%% translated" msgstr "%s%% translated" -#: /views/nodes/stats.ctp:41 +#: views/nodes/stats.ctp:41 msgid "The cookbook needs you! No submissions for this language!" msgstr "The cookbook needs you! No submissions for this language!" -#: /views/nodes/stats.ctp:44 +#: views/nodes/stats.ctp:44 msgid "The cookbook needs you! This language will soon be removed if not updated." msgstr "The cookbook needs you! This language will soon be removed if not updated." -#: /views/nodes/stats.ctp:46 +#: views/nodes/stats.ctp:46 msgid "The cookbook needs you! No updates for one month." msgstr "The cookbook needs you! No updates for one month." -#: /views/nodes/todo.ctp:7 +#: views/nodes/todo.ctp:7 +msgid "Want to check or update the <a href=\"%s\">po file</a> for %s?" +msgstr "Quieres compropbar el <a href=\"%s\">fichero po</a> para castellano?" + +#: views/nodes/todo.ctp:10 msgid "These is no <a href=\"%s\">po file</a> for %s" msgstr "These is no <a href=\"%s\">po file</a> for %s" -#: /views/nodes/todo.ctp:9 +#: views/nodes/todo.ctp:13 +msgid "Please use <a href=\"http://www.poedit.net\">Po Edit</a> when editing po files" +msgstr "" + +#: views/nodes/todo.ctp:14 msgid "These sections either do not have a translation, or the English text has changed since it was translated" msgstr "These sections either do not have a translation, or the English text has changed since it was translated" -#: /views/nodes/view_all.ctp:40;67 +#: views/nodes/view_all.ctp:40;67 msgid "See comments for this section" msgstr "Ver comentarios para esta sección" -#: /views/nodes/view_all.ctp:114;126 +#: views/nodes/view_all.ctp:114;126 msgid "Change history for %s" msgstr "Historia de cambios para %s" -#: /views/revisions/results.ctp:8 +#: views/revisions/results.ctp:8 msgid "Search Results" msgstr "Resultados de búsqueda" -#: /views/revisions/results.ctp:32 +#: views/revisions/results.ctp:32 msgid "No results" msgstr "Sin resultados" -#: /views/revisions/search.ctp:1 +#: views/revisions/search.ctp:1 msgid "Search book.cakephp.org" msgstr "Buscar en book.cakephp.org" -#: /webroot/test.php:75 -msgid "Debug setting does not allow access to this url." -msgstr "Debug setting does not allow access to this url." +#~ msgid "CakePHP: the rapid development php framework:" +#~ msgstr "CakePHP: el framework de desarrollo rápido" +#~ msgid "Debug setting does not allow access to this url." +#~ msgstr "Debug setting does not allow access to this url." diff --git a/models/attachment.php b/models/attachment.php index 4f17ef1..452e11a 100755 --- a/models/attachment.php +++ b/models/attachment.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: attachment.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for attachment.php * @@ -18,9 +17,6 @@ * @package mi-base * @subpackage mi-base.app.models * @since v 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/models/behaviors/image_upload.php b/models/behaviors/image_upload.php index cc0fef1..de2525d 100755 --- a/models/behaviors/image_upload.php +++ b/models/behaviors/image_upload.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: image_upload.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for image_upload.php * @@ -18,9 +17,6 @@ * @package base * @subpackage base.models.behaviors * @since v 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ require_once('upload.php'); diff --git a/models/behaviors/polymorphic.php b/models/behaviors/polymorphic.php index d4dc25a..45f4e5e 100755 --- a/models/behaviors/polymorphic.php +++ b/models/behaviors/polymorphic.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: polymorphic.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Polymorphic Behavior. * @@ -18,9 +17,6 @@ * @package base * @subpackage base.models.behaviors * @since v 0.1 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/models/behaviors/slugged.php b/models/behaviors/slugged.php index 2ea1692..ac7541d 100644 --- a/models/behaviors/slugged.php +++ b/models/behaviors/slugged.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: slugged.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for slugged.php * @@ -18,9 +17,6 @@ * @package base * @subpackage base.models.behaviors * @since v 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/models/behaviors/upload.php b/models/behaviors/upload.php index 33354e8..30354bc 100755 --- a/models/behaviors/upload.php +++ b/models/behaviors/upload.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: upload.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for upload.php * @@ -18,9 +17,6 @@ * @package base * @subpackage base.models.behaviors * @since v 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/models/change.php b/models/change.php index 25ccd9d..fa9f1cb 100644 --- a/models/change.php +++ b/models/change.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: change.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for change.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.models * @since 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/models/comment.php b/models/comment.php index 3afcccc..36b218a 100644 --- a/models/comment.php +++ b/models/comment.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: comment.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for comment.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.models * @since 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/models/node.php b/models/node.php index 6d4766a..540e96f 100644 --- a/models/node.php +++ b/models/node.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: node.php 701 2008-11-19 12:12:33Z AD7six $ */ /** * Short description for node.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.models * @since 1.0 - * @version $Revision: 701 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-19 13:12:33 +0100 (Wed, 19 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -156,6 +152,7 @@ class Node extends AppModel { * * When looking for English content, if there isn't a current revision, populate with default text * When looking for none English content, if there isn't a current revision populate with the English text + * Auto correct any links in content to point at same-language pages * * @param mixed $results * @access public @@ -163,7 +160,8 @@ class Node extends AppModel { */ function afterFind($results) { $before = $results; - if ($this->language == 'en') { + $defaultLang = Configure::read('Languages.default'); + if ($this->language == $defaultLang) { if (isset($results[0]['Revision'])) { foreach ($results as $i => $result) { if (array_key_exists('title', $result['Revision']) && !$result['Revision']['title']) { @@ -176,53 +174,64 @@ class Node extends AppModel { $results[$i]['Revision']['content'] = __('Default Content', true); } if (array_key_exists('lang', $result['Revision']) && !$result['Revision']['lang']) { - $results[$i]['Revision']['lang'] = 'en'; + $results[$i]['Revision']['lang'] = $defaultLang; } } } - } else { - if (isset($results[0]['Revision'])) { - $missing = false; - foreach ($results as $i => $result) { + return $results; + } + if (isset($results[0]['Revision'])) { + $missing = false; + foreach ($results as $result) { + if (array_key_exists('title', $result['Revision']) && !$result['Revision']['title']) { + $missing = true; + break; + } + if (array_key_exists('slug', $result['Revision']) && !$result['Revision']['slug']) { + $missing = true; + break; + } + if (array_key_exists('content', $result['Revision']) && !$result['Revision']['content']) { + $missing = true; + break; + } + } + $language = $this->language; + if ($missing) { + $this->setLanguage($defaultLang); + if ($this->__queryData['order'] == array(null)) { + unset($this->__queryData['order']); + } + $ids = Set::Extract($results, '/Node/id'); + $engResults = $this->find('all', am($this->__queryData, array('conditions' => array('Node.id' => $ids)))); + $this->setLanguage($language); + } + $root = trim(Router::url('/'), '/'); + if ($root) { + $root .= '/'; + } + $find = '@href="/' . $root . '(?!' . $language . '/)@'; + $replace = 'href="/' . $root . $language . '/'; + foreach ($results as $i => &$result) { + if (isset($engResults[$i])) { if (array_key_exists('title', $result['Revision']) && !$result['Revision']['title']) { - $missing = true; - break; + $result['Revision']['title'] = $engResults[$i]['Revision']['title']; } if (array_key_exists('slug', $result['Revision']) && !$result['Revision']['slug']) { - $missing = true; - break; + $result['Revision']['slug'] = $engResults[$i]['Revision']['slug']; } if (array_key_exists('content', $result['Revision']) && !$result['Revision']['content']) { - $missing = true; - break; + $result['Revision']['content'] = + $engResults[$i]['Revision']['content']; } - } - if ($missing) { - $language = $this->language; - $this->setLanguage('en'); - if ($this->__queryData['order'] == array(null)) { - unset($this->__queryData['order']); - } - $ids = Set::Extract($results, '/Node/id'); - $engResults = $this->find('all', am($this->__queryData, array('conditions' => array('Node.id' => $ids)))); - $this->setLanguage($language); - foreach ($results as $i => $result) { - if (isset($engResults[$i])) { - if (array_key_exists('title', $result['Revision']) && !$result['Revision']['title']) { - $results[$i]['Revision']['title'] = $engResults[$i]['Revision']['title']; - } - if (array_key_exists('slug', $result['Revision']) && !$result['Revision']['slug']) { - $results[$i]['Revision']['slug'] = $engResults[$i]['Revision']['slug']; - } - if (array_key_exists('content', $result['Revision']) && !$result['Revision']['content']) { - $results[$i]['Revision']['content'] = $engResults[$i]['Revision']['content']; - } - if (array_key_exists('lang', $result['Revision']) && !$result['Revision']['lang']) { - $results[$i]['Revision']['lang'] = 'en'; - } - } + if (array_key_exists('lang', $result['Revision']) && !$result['Revision']['lang']) { + $result['Revision']['lang'] = $defaultLang; } } + //if (isset($result['Revision']['content']) && strpos('href="/', $result['Revision']['content'])) { + if (isset($result['Revision']['content'])) { + $result['Revision']['content'] = preg_replace($find, $replace, $result['Revision']['content']); + } } } return $results; @@ -235,7 +244,7 @@ class Node extends AppModel { * @return void */ function beforeFind($queryData) { - if ($this->language != 'en') { + if ($this->language != Configure::read('Languages.default')) { $this->__queryData = $queryData; } return true; @@ -438,7 +447,7 @@ class Node extends AppModel { $allow_moves = true; $auto_approve = true; } - $importLang = isset($meta[0]['Meta']['lang'])?$meta[0]['Meta']['lang']:'en'; + $importLang = isset($meta[0]['Meta']['lang'])?$meta[0]['Meta']['lang']:Configure::read('Languages.default');; $this->setLanguage($importLang); $message = array(); $counters = array(); @@ -640,7 +649,8 @@ class Node extends AppModel { 'title' => 'Your Collections', 'content' => 'Edit the collection index to change this text', 'status' => 'current', - 'lang' => 'en'); + 'lang' => Configure::read('Languages.default') + ); $this->Revision->create(); $this->Revision->save($toSave); for ($i=1; $i<=$collections; $i++) { @@ -662,7 +672,7 @@ class Node extends AppModel { * @access private */ function __initCollection($i, $books, $sections, $id) { - $toSave = array('status' => 'current', 'lang' => 'en', 'content' => 'a collection of books'); + $toSave = array('status' => 'current', 'lang' => Configure::read('Languages.default'), 'content' => 'a collection of books'); $this->create(); $this->save(array('parent_id' => $id)); $id = $this->id; @@ -682,7 +692,7 @@ class Node extends AppModel { * @access private */ function __initBook($i, $sections, $id) { - $toSave = array('status' => 'current', 'lang' => 'en', 'content' => 'a book about... ' . $i); + $toSave = array('status' => 'current', 'lang' => Configure::read('Languages.default'), 'content' => 'a book about... ' . $i); $this->create(); $this->save(array('parent_id' => $id)); $id = $this->id; @@ -711,7 +721,7 @@ class Node extends AppModel { $this->save(array('parent_id' => $id)); $id = $this->id; $this->Revision->create(); - $toSave = array('status' => 'current', 'lang' => 'en', 'content' => 'Section ' . $id . ' content'); + $toSave = array('status' => 'current', 'lang' => Configure::read('Languages.default'), 'content' => 'Section ' . $id . ' content'); $this->Revision->save(am($toSave, array('node_id' => $id, 'title' => 'Section id ' . $id))); return $this->Revision->id; } @@ -736,17 +746,18 @@ class Node extends AppModel { $fields = array('lang', 'title'); $oldTitles = $this->Revision->find('list', compact('recursive', 'conditions', 'fields', 'order')); $toSave = array(); + $defaultLang = Configure::read('Languages.default'); foreach ($contents as $lang => $content) { - $title = isset($titles[$lang])?$titles[$lang]:$titles['en']; + $title = isset($titles[$lang])?$titles[$lang]:$titles[$defaultLang]; $toSave[$lang] = array( 'node_id' => $mergeId, 'title' => $title, 'content' => $content, 'lang' => $lang, - 'reason' => 'Merging "' . $oldTitles['en'] . '" content into "' . $title . '"', + 'reason' => 'Merging "' . $oldTitles[$defaultLang] . '" content into "' . $title . '"', 'user_id' => $this->currentUserId ); - if ($lang != 'en') { + if ($lang != $defaultLang) { $toSave[$lang]['flags'] = 'englishChanged'; } } @@ -757,9 +768,9 @@ class Node extends AppModel { $toSave[$lang] = array( 'node_id' => $mergeId, 'title' => $title, - 'content' => $contents['en'], + 'content' => $contents[$defaultLang], 'lang' => $lang, - 'reason' => 'Merging "' . $oldTitles['en'] . '" content into "' . $title . '"', + 'reason' => 'Merging "' . $oldTitles[$defaultLang] . '" content into "' . $title . '"', 'user_id' => $this->currentUserId, 'flags' => 'englishChanged' ); @@ -840,6 +851,24 @@ class Node extends AppModel { $conditions['Node.rght <'] = $this->field('rght', array('id' => $parentId)); } else { $conditions = array(); + $table = $this->table; + $this->query("UPDATE $table SET depth = ( + SELECT wrapper.parents FROM ( + SELECT + this.id as row, + COUNT(parent.id) as parents + FROM + $table AS this + LEFT JOIN $table AS parent ON ( + parent.lft < this.lft AND + parent.rght > this.rght) + GROUP BY + this.id + ) AS wrapper WHERE wrapper.row = $table.id)"); + $db =& ConnectionManager::getDataSource($this->useDbConfig); + if (!$db->error) { + return true; + } } $nodes = $this->find('list', compact('conditions')); foreach ($nodes as $nodeId => $node) { @@ -895,7 +924,10 @@ class Node extends AppModel { * @access public * @return void */ - function setLanguage($lang = 'en') { + function setLanguage($lang = null) { + if (!$lang) { + $lang = Configure::read('Languages.default'); + } $bind['hasOne']['Revision']['conditions']['Revision.lang'] = $lang; $bind['hasOne']['Revision']['conditions']['Revision.status'] = 'current'; $bind['hasMany']['Comment']['conditions']['Comment.lang'] = $lang; diff --git a/models/revision.php b/models/revision.php index 34e2dfb..c4f4ffa 100644 --- a/models/revision.php +++ b/models/revision.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: revision.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for revision.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.models * @since 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** @@ -124,6 +120,7 @@ class Revision extends AppModel { $Change = ClassRegistry::init('Change'); $Change->create(); $Change->save($change); + $this->Behaviors->enable('Searchable'); } /** * beforeSave function @@ -138,6 +135,7 @@ class Revision extends AppModel { ) { $this->data['Revision']['lang'] = $this->Node->language; } + $this->Behaviors->disable('Searchable'); return true; } /** @@ -238,7 +236,7 @@ class Revision extends AppModel { ); $this->create($update); $this->save(); - $this->delete_from_index($revision); + //$this->delete_from_index($revision); } $this->id = $id; $change['status_from'] = $this->field('status'); @@ -249,11 +247,12 @@ class Revision extends AppModel { $change['user_id'] = $this->currentUserId; $return = $this->saveField('status', 'current'); $data = $this->read(); - if ($data['Revision']['lang'] == 'en' && $flagTranslations) { + $defaultLang = Configure::read('Languages.default'); + if ($data['Revision']['lang'] == $defaultLang && $flagTranslations) { $conditions = array(); $conditions['Revision.node_id'] = $data['Revision']['node_id']; $conditions['Revision.status'] = array('current', 'pending'); - $conditions['NOT']['Revision.lang'] = 'en'; + $conditions['NOT']['Revision.lang'] = $defaultLang; $hasTranslations = $this->find('count', compact('conditions')); if ($hasTranslations) { $revisions = $this->find('list', compact('conditions')); diff --git a/plugins/searchable/models/behaviors/searchable.php b/plugins/searchable/models/behaviors/searchable.php index 054ac5e..2d161f6 100644 --- a/plugins/searchable/models/behaviors/searchable.php +++ b/plugins/searchable/models/behaviors/searchable.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: searchable.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for searchable.php * @@ -15,7 +14,7 @@ * @filesource * @copyright Copyright (c) 2008, Marcin Domanski * @link www.kabturek.info - * @package + * @package * @subpackage projects.cookbook.models.behaviors * @since v 0.1 * @license http://www.opensource.org/licenses/mit-license.php The MIT License @@ -24,7 +23,7 @@ * SearchableBehavior class * * @uses ModelBehavior - * @package + * @package * @subpackage searchable.models.behaviors.searchable */ class SearchableBehavior extends ModelBehavior { @@ -329,9 +328,9 @@ class SearchableBehavior extends ModelBehavior { $this->Index->commit(); if (Configure::read()) { $Hits = $this->Index->find($query); - // TODO why isn't it possible to find what was just added if(!count($Hits)){ - debug ('Tried to add to the search index, no errors but couldnt find what was just added!'); + // TODO why isn't it possible to find what was just added + $this->log('Tried to add to the search index, no errors but couldnt find what was just added!', 'searchable'); } $this->log('added to index id:'.$id, 'searchable'); } diff --git a/plugins/searchable/vendors/shells/search.php b/plugins/searchable/vendors/shells/search.php index fe7cf86..ee1201e 100644 --- a/plugins/searchable/vendors/shells/search.php +++ b/plugins/searchable/vendors/shells/search.php @@ -61,8 +61,10 @@ class SearchShell extends Shell { } else { $results = $model->find('all', $model_options['find_options']); } - $this->log($model->name.' find time: '.(time()-$start)); - $start = time(); + if (Configure::read()) { + $this->log($model->name.' find time: '.(time()-$start), 'searchable'); + $start = time(); + } $count = count($results); $i =1; @@ -72,26 +74,30 @@ class SearchShell extends Shell { $i++; $this->out('Processing '.$model->name.' #'.$result[$model->name]['id']); - $doc = new Zend_Search_Lucene_Document(); + $doc = new Zend_Search_Lucene_Document(); // add the model field $doc->addField(Zend_Search_Lucene_Field::Keyword('cake_model', $model->name, 'utf-8')); foreach($model_options['fields'] as $field_name => $options){ - if(!empty($options['prepare']) && function_exists($options['prepare'])){ - $result[$model->name][$field_name] = call_user_func($options['prepare'], $result[$model->name][$field_name]); - } + if(!empty($options['prepare']) && function_exists($options['prepare'])){ + $result[$model->name][$field_name] = call_user_func($options['prepare'], $result[$model->name][$field_name]); + } $alias = !empty($options['alias']) ? $options['alias'] : $field_name; $doc->addField(Zend_Search_Lucene_Field::$options['type']($alias, $result[$model->name][$field_name], 'utf-8')); } $index->addDocument($doc); $this->out('Processed '.$model->name.' #'.$result[$model->name]['id']); } - $this->log($model->name.' adding time: '.(time()-$start)); - $start = time(); + if (Configure::read()) { + $this->log($model->name.' adding time: '.(time()-$start), 'searchable'); + $start = time(); } + } $this->optimize($index); $index->commit(); - $this->log('Optimize+commit time: '.(time()-$start)); + if (Configure::read()) { + $this->log('Optimize+commit time: '.(time()-$start)); + } } /** * query function diff --git a/plugins/users/controllers/users_controller.php b/plugins/users/controllers/users_controller.php index 4616a06..99e425b 100644 --- a/plugins/users/controllers/users_controller.php +++ b/plugins/users/controllers/users_controller.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: users_controller.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -27,9 +26,6 @@ * @package csf * @subpackage csf.plugins.users.controllers * @since CSF v 1.0.0.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.cakefoundation.org/licenses/csfl/ The CSFL License */ /** @@ -81,7 +77,7 @@ class UsersController extends AppController { function logout() { $this->Session->destroy(); - $this->redirect('/', null, true); + $this->redirect(array('plugin' => null, 'controller' => 'nodes', 'action' => 'index'), null, true); } function reset() { diff --git a/plugins/users/models/group.php b/plugins/users/models/group.php index 45554d7..d93664c 100644 --- a/plugins/users/models/group.php +++ b/plugins/users/models/group.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: group.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -27,9 +26,6 @@ * @package bakery * @subpackage bakery.models * @since Bakery v 1.0.0.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.cakefoundation.org/licenses/csfl/ The CSFL License */ /** diff --git a/plugins/users/models/level.php b/plugins/users/models/level.php index 06e811b..7db1fa8 100644 --- a/plugins/users/models/level.php +++ b/plugins/users/models/level.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: level.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -27,9 +26,6 @@ * @package bakery * @subpackage bakery.models * @since Bakery v 1.0.0.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.cakefoundation.org/licenses/csfl/ The CSFL License */ /** diff --git a/plugins/users/models/profile.php b/plugins/users/models/profile.php index d4c9084..f6c11ed 100644 --- a/plugins/users/models/profile.php +++ b/plugins/users/models/profile.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: profile.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -27,9 +26,6 @@ * @package bakery * @subpackage bakery.models * @since Bakery v 1.0.0.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.cakefoundation.org/licenses/csfl/ The CSFL License */ /** diff --git a/plugins/users/models/user.php b/plugins/users/models/user.php index 1256a05..b2eb29f 100644 --- a/plugins/users/models/user.php +++ b/plugins/users/models/user.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: user.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -27,9 +26,6 @@ * @package csf * @subpackage csf.plugins.users.models * @since CSF v 1.0.0.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.cakefoundation.org/licenses/csfl/ The CSFL License */ /** diff --git a/plugins/users/users_app_controller.php b/plugins/users/users_app_controller.php index 3f45d3f..f833885 100644 --- a/plugins/users/users_app_controller.php +++ b/plugins/users/users_app_controller.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: users_app_controller.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -27,9 +26,6 @@ * @package csf * @subpackage csf.plugins.users * @since CSF v 1.0.0.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.cakefoundation.org/licenses/csfl/ The CSFL License */ /** diff --git a/plugins/users/users_app_model.php b/plugins/users/users_app_model.php index 1fe0bba..1387d2f 100644 --- a/plugins/users/users_app_model.php +++ b/plugins/users/users_app_model.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: users_app_model.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -27,9 +26,6 @@ * @package csf * @subpackage csf.plugins.users * @since CSF v 1.0.0.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.cakefoundation.org/licenses/csfl/ The CSFL License */ /** diff --git a/plugins/users/views/users/login.ctp b/plugins/users/views/users/login.ctp index 32685f1..45d97a0 100644 --- a/plugins/users/views/users/login.ctp +++ b/plugins/users/views/users/login.ctp @@ -1,7 +1,6 @@ -<?php /* SVN FILE: $Id: login.ctp 659 2008-09-10 14:52:21Z AD7six $ */ ?> <div class="login"> <?php - echo $form->create('User', array('url' => '/users/login')); + echo $form->create('User', array('action' => 'login')); echo $form->hidden('redirect', array('value' => $session->read('Auth.redirect'))); ?> <fieldset> diff --git a/tests/cases/models/node.test.php b/tests/cases/models/node.test.php index 0591402..3949c5f 100644 --- a/tests/cases/models/node.test.php +++ b/tests/cases/models/node.test.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: node.test.php 694 2008-11-05 13:59:08Z AD7six $ */ /** * Short description for node.test.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.tests.cases.models * @since v 1.0 - * @version $Revision: 694 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 14:59:08 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ App::import('Model', 'Node'); diff --git a/tests/fixtures/comment_fixture.php b/tests/fixtures/comment_fixture.php index 5a2fcef..84775ae 100644 --- a/tests/fixtures/comment_fixture.php +++ b/tests/fixtures/comment_fixture.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: comment_fixture.php 693 2008-11-05 13:01:32Z AD7six $ */ /** * Short description for comment_fixture.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.tests.fixtures * @since v 1.0 - * @version $Revision: 693 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 14:01:32 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/tests/fixtures/node_fixture.php b/tests/fixtures/node_fixture.php index 24a6490..8f2ae35 100644 --- a/tests/fixtures/node_fixture.php +++ b/tests/fixtures/node_fixture.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: node_fixture.php 693 2008-11-05 13:01:32Z AD7six $ */ /** * Short description for node_fixture.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.tests.fixtures * @since v 1.0 - * @version $Revision: 693 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 14:01:32 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/tests/fixtures/revision_fixture.php b/tests/fixtures/revision_fixture.php index 5cf0c6a..8b65522 100644 --- a/tests/fixtures/revision_fixture.php +++ b/tests/fixtures/revision_fixture.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: revision_fixture.php 693 2008-11-05 13:01:32Z AD7six $ */ /** * Short description for revision_fixture.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.tests.fixtures * @since v 1.0 - * @version $Revision: 693 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 14:01:32 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/tests/fixtures/user_fixture.php b/tests/fixtures/user_fixture.php index aef2030..9f46f1c 100644 --- a/tests/fixtures/user_fixture.php +++ b/tests/fixtures/user_fixture.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: user_fixture.php 693 2008-11-05 13:01:32Z AD7six $ */ /** * Short description for user_fixture.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.tests.fixtures * @since v 1.0 - * @version $Revision: 693 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 14:01:32 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/tmp/cache/models/empty b/tmp/cache/models/empty new file mode 100644 index 0000000..e69de29 diff --git a/tmp/cache/persistent/empty b/tmp/cache/persistent/empty new file mode 100644 index 0000000..e69de29 diff --git a/tmp/cache/views/empty b/tmp/cache/views/empty new file mode 100644 index 0000000..e69de29 diff --git a/tmp/logs/empty b/tmp/logs/empty new file mode 100644 index 0000000..e69de29 diff --git a/tmp/sessions/empty b/tmp/sessions/empty new file mode 100644 index 0000000..e69de29 diff --git a/tmp/tests/empty b/tmp/tests/empty new file mode 100644 index 0000000..e69de29 diff --git a/vendors/Zend/Search/Lucene/Index/SegmentInfo.php b/vendors/Zend/Search/Lucene/Index/SegmentInfo.php index edb60cc..f38fbfe 100644 --- a/vendors/Zend/Search/Lucene/Index/SegmentInfo.php +++ b/vendors/Zend/Search/Lucene/Index/SegmentInfo.php @@ -215,7 +215,6 @@ class Zend_Search_Lucene_Index_SegmentInfo } } } - $this->_segFiles = array(); if ($this->_isCompound) { $cfsFile = $this->_directory->getFileObject($name . '.cfs'); @@ -1480,4 +1479,4 @@ class Zend_Search_Lucene_Index_SegmentInfo { return $this->_lastTermPositions; } -} +} \ No newline at end of file diff --git a/vendors/highlight.php b/vendors/highlight.php index 8095262..3289f7c 100644 --- a/vendors/highlight.php +++ b/vendors/highlight.php @@ -1,10 +1,9 @@ <?php -/* SVN FILE: $Id: highlight.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Class to style php code as an ordered list. * - * Originally from http://shiflett.org/blog/oct/formatting-and-highlighting-php-code-listings + * Originally from http://shiflett.org/blog/2006/oct/formatting-and-highlighting-php-code-listings * Some minor modifications to allow it to work with php4. * * PHP versions 4 and 5 @@ -12,10 +11,7 @@ * @filesource * @package vendors * @since Noswad site version 3 - * @version $Revision: 689 $ * @created 26/01/2007 - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ */ /* diff --git a/vendors/shells/search.php b/vendors/shells/search.php index 92144b8..9c0972d 100644 --- a/vendors/shells/search.php +++ b/vendors/shells/search.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: search.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for search.php * @@ -15,7 +14,7 @@ * @filesource * @copyright Copyright (c) 2008, Marcin Domanski * @link www.kabturek.info - * @package + * @package * @subpackage projects.cookbook.models.behaviors * @since v 0.1 * @license http://www.opensource.org/licenses/mit-license.php The MIT License diff --git a/vendors/shells/templates/views/index.ctp b/vendors/shells/templates/views/index.ctp index 0978160..f510e41 100755 --- a/vendors/shells/templates/views/index.ctp +++ b/vendors/shells/templates/views/index.ctp @@ -1,5 +1,4 @@ -<?php /* SVN FILE: $Id: index.ctp 600 2008-08-07 17:55:23Z AD7six $ */ -echo '<?php /* SVN FILE: $Id' . '$ */ ?>' . "\r\n"; +<?php $singularHumanName = Inflector::Humanize( Inflector::Underscore($singularHumanName)); $pluralHumanName = Inflector::Humanize( Inflector::Underscore($pluralHumanName)); $namedString = implode ('\', \'', $fields); diff --git a/views/attachments/admin_import.ctp b/views/attachments/admin_import.ctp index 89b2445..f643dd9 100755 --- a/views/attachments/admin_import.ctp +++ b/views/attachments/admin_import.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: admin_import.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php echo $form->create(null, array('type' => 'file', 'url' => '/' . $this->params['url']['url'])); echo $form->inputs(array( 'legend' => 'Import files from another install, or restore to a previous backup', @@ -8,4 +8,4 @@ echo $form->inputs(array( )); echo $form->submit(); echo $form->end(); -?> +?> \ No newline at end of file diff --git a/views/attachments/admin_index.ctp b/views/attachments/admin_index.ctp index dd6eec9..d440773 100755 --- a/views/attachments/admin_index.ctp +++ b/views/attachments/admin_index.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_index.ctp 666 2008-09-23 18:03:17Z AD7six $ */ ?> <h2>All Attachments</h2> <table> <?php diff --git a/views/attachments/admin_view.ctp b/views/attachments/admin_view.ctp index 5171b77..8cfde87 100755 --- a/views/attachments/admin_view.ctp +++ b/views/attachments/admin_view.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_view.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <h2>Image</h2> <table> <?php diff --git a/views/attachments/xml/admin_export.ctp b/views/attachments/xml/admin_export.ctp index 7582a5d..4639a59 100644 --- a/views/attachments/xml/admin_export.ctp +++ b/views/attachments/xml/admin_export.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: admin_export.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php $uuid = String::uuid(); $from = array_pop(explode('-', $uuid)); $content = $xml->serialize(array('meta' => array('from' => $from, 'on' => date('Y-m-d H:i'))), array('format' => 'tags')); @@ -9,4 +9,4 @@ foreach ($data as $row) { $content .= $xml->serialize(array('Attachment' => $Attachment), array('format' => 'tags')); } echo $xml->elem('contents', null, $content); -?> +?> \ No newline at end of file diff --git a/views/changes/index.ctp b/views/changes/index.ctp index 0607b49..64418cc 100644 --- a/views/changes/index.ctp +++ b/views/changes/index.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: index.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <div class="container"> <h2>Change Log</h2> <ul id="results"> diff --git a/views/changes/rss/index.ctp b/views/changes/rss/index.ctp index 4103a9e..714e982 100755 --- a/views/changes/rss/index.ctp +++ b/views/changes/rss/index.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: index.ctp 638 2008-09-01 23:24:26Z AD7six $ */ +<?php transformRSS (null, $html); echo $rss->items($data, 'transformRSS'); @@ -25,9 +25,9 @@ $desc = '<ul>'; $author = isset($Author['username'])?$Author['username']:'unknown'; - $desc .= '<li>Submitted by: ' . $author . '</li>'; + $desc .= '<li>' . sprintf(__('Submitted by: %s', true), $author) . '</li>'; if ($Change['status_to'] != 'pending'){ - $desc .= '<li>Changed by: ' . $User['username'] . '</li>'; + $desc .= '<li>' . sprintf(__('Changed by: %s', true), $User['username']) . '</li>'; } $comment = $html->clean(trim($Change['comment'])); if ($comment) { diff --git a/views/comments/admin_edit.ctp b/views/comments/admin_edit.ctp index 2cd4f0e..0641535 100644 --- a/views/comments/admin_edit.ctp +++ b/views/comments/admin_edit.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_edit.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <h1>Comments - edit Comment </h1> <div class="form-container"> <?php diff --git a/views/comments/admin_index.ctp b/views/comments/admin_index.ctp index 56b191b..4112f4c 100644 --- a/views/comments/admin_index.ctp +++ b/views/comments/admin_index.ctp @@ -1,7 +1,13 @@ -<?php /* SVN FILE: $Id: admin_index.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> -<h1>Comments</h1> +<h1><?php echo up($language) ?> Comments</h1> <div class="container"> <?php +$links = array(); +foreach ($counts as $lang => $count) { + $links[] = $html->link(sprintf(__n('%s %s comment', '%s %s comments', $count, true), $count, up($lang)), array('lang' => $lang)); +} +if ($links) { + echo '<p>' . implode($links, ', ') . '</p>'; +} $pass = $this->passedArgs; $pass['action'] = str_replace(Configure::read('Routing.admin') . '_', '', $this->action); // temp $paginator->options(array('url' => $pass)); @@ -12,7 +18,6 @@ $th = array( 'Book', $paginator->sort('Section', 'Node.sequence'), $paginator->sort('Comment Title', 'title'), - $paginator->sort('lang'), $paginator->sort('User', 'User.username'), $paginator->sort('email'), $paginator->sort('published'), @@ -45,7 +50,6 @@ foreach ($data as $row) { $book . ' (' . $collection . ')', $Node?$html->link($Node['sequence'] . ' ' . $Revision['title'], am($pass, array('page' => 1, 'node_id' => $Comment['node_id']))):'', $html->link($Comment['title'], array('action' => 'view', $Comment['id'])), - $html->link($Comment['lang'], am($pass, array('page' => 1, 'lang' => $Comment['lang']))), $User?$html->link($User['username'], am($pass, array('page' => 1, 'user_id' => $Comment['user_id']))):'', $html->link($Comment['email'], am($pass, array('page' => 1, 'email' => $Comment['email']))), $html->link($Comment['published'], am($pass, array('page' => 1, 'published' => $Comment['published']))), diff --git a/views/comments/admin_view.ctp b/views/comments/admin_view.ctp index c4bbb62..f245aca 100644 --- a/views/comments/admin_view.ctp +++ b/views/comments/admin_view.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_view.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <h2>Comment</h2> <table> <?php diff --git a/views/comments/index.ctp b/views/comments/index.ctp index 6428ceb..74ebfc8 100644 --- a/views/comments/index.ctp +++ b/views/comments/index.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: index.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <h2><?php if (isset($node)) { echo $html->link(sprintf(__('Comments: %s', true), htmlspecialchars($node['Revision']['title'])), array('id' => $this->params['id'])); @@ -17,5 +16,5 @@ if (!$data) { if (isset($node)) { echo $this->element('comment_form'); } -$html->meta('rss', am($this->params['pass'], array('ext' => 'rss')), array('title' => __('This page as a feed', true)), false); +$html->meta('rss', $html->url($this->passedArgs) . '.rss', array('title' => __('This page as a feed', true)), false); ?> \ No newline at end of file diff --git a/views/comments/rss/index.ctp b/views/comments/rss/index.ctp index c8fca4b..9cd2dcd 100755 --- a/views/comments/rss/index.ctp +++ b/views/comments/rss/index.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: index.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php transformRSS (null, $html, $this); echo $rss->items($data, 'transformRSS'); @@ -15,7 +15,7 @@ 'title' => $Node['sequence'] . ' ' . $Revision['title'] . ' - ' . $html->clean(htmlspecialchars($Comment['title'])), 'link' => array('controller' => 'comments', 'action' => 'index', $Comment['node_id'], 'lang' => $Comment['lang'], '#' => "comment_{$Comment['id']}"), - 'description' => $_this->element('comment', array('data' => $row)), + 'description' => $_this->element('comment', array('data' => $row, 'fixedDates' => true)), 'pubDate' => date('r', strtotime($Comment['created'])), ); } diff --git a/views/comments/rss/recent.ctp b/views/comments/rss/recent.ctp index 6239097..b974396 100755 --- a/views/comments/rss/recent.ctp +++ b/views/comments/rss/recent.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: recent.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php transformRSS (null, $html, $this); echo $rss->items($data, 'transformRSS'); @@ -14,7 +14,7 @@ return array( 'title' => $Comment['title'], 'link' => array('controller' => 'comments', 'action' => 'view', $Comment['id']), - 'description' => $_this->element('comment', array('data' => $row['Comment'])), + 'description' => $_this->element('comment', array('data' => $row['Comment'], 'fixedDates' => true)), 'pubDate' => date('r', strtotime($Comment['created'])), ); } diff --git a/views/elements/attachments.ctp b/views/elements/attachments.ctp index 8c43ce0..421f4ba 100644 --- a/views/elements/attachments.ctp +++ b/views/elements/attachments.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: attachments.ctp 666 2008-09-23 18:03:17Z AD7six $ */ ?> <div id='thumbs' class='clearfix'><p><?php __('Images/Files associated with this content') ?></p><?php $out = array(); if (isset($attachments)) { diff --git a/views/elements/collections.ctp b/views/elements/collections.ctp index 536aefe..004f137 100644 --- a/views/elements/collections.ctp +++ b/views/elements/collections.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: collections.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <div id="main_nav"> <ul class="navigation"> <?php @@ -6,7 +5,11 @@ $collections = cache('views/collection_' . $this->params['lang']); if ($collections) { $collections = unserialize($collections); } else { - $collections = $this->requestAction('/nodes/collections/' . $this->params['lang']); + $__cache = Configure::read('Cache.check'); + Configure::write('Cache.check', false); + $collections = $this->requestAction(array('plugin' => null, 'prefix' => null, 'controller' => 'nodes', + 'action' => 'collections', 'lang' => $this->params['lang'])); + Configure::write('Cache.check', $__cache); } $currentCollection = isset($currentPath[1])?$currentPath[1]:array('Node' => array('id' => false)); foreach ($collections as $row) { diff --git a/views/elements/comment.ctp b/views/elements/comment.ctp index 1b015ce..4439205 100755 --- a/views/elements/comment.ctp +++ b/views/elements/comment.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: comment.ctp 673 2008-10-06 14:05:17Z AD7six $ */ +<?php if (1==2 && $data['user_id']==$data['Revision']['user_id']) { $class = " highlight"; } else { @@ -12,7 +12,11 @@ if (isset($commenters[$user_id])) { } echo "<div id='comment_{$id}' class=\"comment$class\">"; echo "<p class=\"commentmeta\">"; -echo 'By ' . $name . ' ' . $time->timeAgoInWords($created); +if (!empty($fixedDates)) { + echo sprintf(__('By %s on %s', true), $name, $time->nice($created)); +} else { + echo sprintf(__('By %s %s', true), $name, $time->timeAgoInWords($created)); +} echo "</p>"; echo "<p class=\"commenttitle\">"; if ($this->action == 'recent') { @@ -29,5 +33,4 @@ echo "</p>"; echo "<div class=\"commentbody\">"; echo '<p>' . implode(explode("\n", htmlspecialchars($body)), '</p><p>') . '</p>'; echo "</div>"; -echo "</div>"; -?> \ No newline at end of file +echo "</div>";?> \ No newline at end of file diff --git a/views/elements/comment_form.ctp b/views/elements/comment_form.ctp index 9d287ea..307e7d1 100644 --- a/views/elements/comment_form.ctp +++ b/views/elements/comment_form.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: comment_form.ctp 661 2008-09-10 14:53:56Z AD7six $ */ +<?php if (!isset($auth['User']['id'])) { echo '<div class="comment"><p class="commenttitle"><em>'; echo $html->link(__('Login to add a comment', true), array('controller' => 'comments', 'action' => 'add')); diff --git a/views/elements/crumbs/nodes.ctp b/views/elements/crumbs/nodes.ctp index 0d23a02..f49194d 100644 --- a/views/elements/crumbs/nodes.ctp +++ b/views/elements/crumbs/nodes.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: nodes.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php if (isset($crumbPath) && count($crumbPath) > 1) { //$html->addCrumb('Collection Index',array('action'=>'index')); if (isset($this->params['admin']) && $this->params['admin']) { diff --git a/views/elements/crumbs/toc.ctp b/views/elements/crumbs/toc.ctp index 3658ef6..6e7547f 100644 --- a/views/elements/crumbs/toc.ctp +++ b/views/elements/crumbs/toc.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: toc.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php if (isset($crumbPath)&&($crumbPath)) { //$html->addCrumb('Collection Index',array('action'=>'index')); foreach($crumbPath as $linkInfo) { diff --git a/views/elements/development.ctp b/views/elements/development.ctp deleted file mode 100644 index 5b667eb..0000000 --- a/views/elements/development.ctp +++ /dev/null @@ -1,17 +0,0 @@ -<?php /* SVN FILE: $Id: development.ctp 658 2008-09-10 14:51:09Z AD7six $ */ -$cakeDebug['Params'] = $this->params; -$cakeDebug['Session'] = $session->read(); -$cookie = ClassRegistry::getObject('Component.Cookie'); -if ($cookie) { - $cakeDebug['Cookie'] = $cookie->read(); -} else { - $cakeDebug['Cookie'] = $_COOKIE; -} -if ($this->data) { - $cakeDebug['ValidationErrors'] = $this->validationErrors; - $cakeDebug['ViewVars'] = $this->viewVars; -} -echo '<pre class="cakeDebug">'; -echo 'Debug Info' . "\r\n"; -pr ($cakeDebug); -echo '</pre>'; \ No newline at end of file diff --git a/views/elements/filter.ctp b/views/elements/filter.ctp index 9f4dced..a0e3724 100644 --- a/views/elements/filter.ctp +++ b/views/elements/filter.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: filter.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <p> <?php if (!isset($filters)) { diff --git a/views/elements/menu/generic.ctp b/views/elements/menu/generic.ctp index 913861e..1415e11 100644 --- a/views/elements/menu/generic.ctp +++ b/views/elements/menu/generic.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: generic.ctp 683 2008-10-25 23:05:10Z AD7six $ */ +<?php if (!isset($session)) { return; } @@ -85,99 +85,71 @@ if (isset($this->params['admin'])) { 'published' => 0), 'under' => 'Comments' )); - } - } if ($auth['User']['Level'] >= ADMIN) { if ($this->name == 'Nodes') { $menu->add(array( - 'section' => 'Main Options', - 'title' => 'Admin functions', - 'url' => false, - 'under' => 'Nodes' - )); - $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Verify Tree', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'nodes', 'action' => 'verify_tree', 'admin' => true), - 'under' => 'Admin functions' )); $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Recover Tree', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'nodes', 'action' => 'recover_tree', 'admin' => true), - 'under' => 'Admin functions' )); $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Reset Depths', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'nodes', 'action' => 'reset_depths', 'admin' => true), - 'under' => 'Admin functions' )); $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Reset Sequences', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'nodes', 'action' => 'reset_sequences', 'admin' => true), - 'under' => 'Admin functions' )); $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Export', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'nodes', 'action' => 'export', 'admin' => true), - 'under' => 'Admin functions' )); $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Import', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'nodes', 'action' => 'import', 'admin' => true), - 'under' => 'Admin functions' )); } elseif ($this->name == 'Revisions') { $menu->add(array( - 'section' => 'Main Options', - 'title' => 'Admin functions', - 'url' => false, - 'under' => 'Revisions' - )); - $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Reset Slugs', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'revisions', 'action' => 'reset_slugs', 'admin' => true), - 'under' => 'Admin functions' )); $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Build Search Index', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'revisions', 'action' => 'build_index', 'admin' => true), - 'under' => 'Admin functions' )); $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Delete and Build Search Index', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'revisions', 'action' => 'build_index', 'admin' => true, 'reset'), - 'under' => 'Admin functions' )); $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Check and fix current revisions', 'url' => array('prefix' => null, 'plugin' => null, 'controller' => 'revisions', 'action' => 'reset'), - 'under' => 'Admin functions' )); - } elseif ($this->name == 'Comments') { - } elseif ($this->name == 'Attachments') { $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Export', 'url' => array('prefix' => null, 'plugin' => null, 'action' => 'export', 'admin' => true), - 'under' => 'Admin functions' )); $menu->add(array( - 'section' => 'Main Options', + 'section' => 'Admin functions', 'title' => 'Import', 'url' => array('prefix' => null, 'plugin' => null, 'action' => 'import', 'admin' => true), - 'under' => 'Admin functions' )); } } diff --git a/views/elements/node_navigation.ctp b/views/elements/node_navigation.ctp index 63a0b39..6aab383 100755 --- a/views/elements/node_navigation.ctp +++ b/views/elements/node_navigation.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: node_navigation.ctp 673 2008-10-06 14:05:17Z AD7six $ */ ?> <div class="node-nav"> <?php $prevUrl = $nextUrl = false; diff --git a/views/elements/node_options.ctp b/views/elements/node_options.ctp index e6b6d25..017025f 100644 --- a/views/elements/node_options.ctp +++ b/views/elements/node_options.ctp @@ -1,16 +1,20 @@ -<?php /* SVN FILE: $Id: node_options.ctp 705 2008-11-19 12:15:50Z AD7six $ */ +<?php if (isset($this->params['admin'])) { return; } extract($data); $options = array(); if ($Node['edit_level'] <= $auth['User']['Level']) { - $out[] = $html->link(__('Edit', true), array('action'=>'edit',$Node['id'], $Revision['slug'])); + if (!$Revision['id']) { + $out[] = $html->link(__('Translate', true), array('action'=>'edit',$Node['id'], $Revision['slug'])); + } else { + $out[] = $html->link(__('Edit', true), array('action'=>'edit',$Node['id'], $Revision['slug'])); + } } if ($Node['depth'] >= $viewAllLevel) { $out[] = $html->link(__('View just this section', true), array('action'=>'view',$Node['id'], $Revision['slug'])); } -if ($Node['comment_level'] <= $auth['User']['Level']) { +if ($Node['comment_level'] <= $auth['User']['Level'] && $this->layout == 'default') { $out[] = $html->link(sprintf(__('Comments (%s)', true), count($Comment)), '#comments-' . $Node['id'], array('class' => 'show-comment')); } $flags = explode(',', trim($Revision['flags'])); @@ -35,7 +39,7 @@ foreach($flags as $flag) { $flagLis .= '<li class="flag warning">' . __($flag, true) . '</li>'; } } -if ($this->params['lang'] != 'en' && $Revision['id'] && $compare) { +if ($this->params['lang'] != $defaultLang && $Revision['id'] && $compare) { $out[] = $html->link(__('Compare to original content', true), array('action' => 'compare', $Node['id'], $Revision['slug'])); } diff --git a/views/elements/preview.ctp b/views/elements/preview.ctp index 0872708..931357a 100644 --- a/views/elements/preview.ctp +++ b/views/elements/preview.ctp @@ -1,12 +1,12 @@ -<?php /* SVN FILE: $Id: preview.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php if (isset($highlight)) { $highlight->auto = false; } $messages = array( - 'Perfect!' => 'How\'d you like them apples?', - 'Done!' => 'How\'s that for a slice of fried gold?', - 'Tastey!' => 'How\'s that for a slice of cake?', - 'Yeah!' => 'Are we done yet?', + 'Perfect!' => __('How\'d you like them apples?', true), + 'Done!' => __('How\'s that for a slice of fried gold?', true), + 'Tastey!' => __('How\'s that for a slice of cake?', true), + 'Yeah!' => __('Are we done yet?', true) ); $confirm = array_rand($messages); $message = $messages[$confirm]; @@ -54,7 +54,7 @@ if (empty($errors)) { } echo $form->create(null, array('url' => '/' .$this->params['url']['url'])); echo $form->inputs($inputs); - echo $form->end($confirm . ' Save it'); + echo $form->end($confirm . ' ' . __('Save it', true)); } ?> -</fieldset> +</fieldset> \ No newline at end of file diff --git a/views/elements/search.ctp b/views/elements/search.ctp index c6af76e..71dc82f 100644 --- a/views/elements/search.ctp +++ b/views/elements/search.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: search.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <div id="site_search"><?php $currentCollection = 2; if (isset($currentPath[1])) { diff --git a/views/elements/search_form.ctp b/views/elements/search_form.ctp index 1465b93..142212d 100644 --- a/views/elements/search_form.ctp +++ b/views/elements/search_form.ctp @@ -5,9 +5,9 @@ echo $form->label('Search.query'); echo $form->text('Search.query', array('value' => $query)); echo $form->label('Search.collection'); echo $form->radio('Search.collection', array( 304 =>'1.1', 2 => '1.2'), array('default' => 2)); -if($this->params['lang'] != 'en') { +if($this->params['lang'] != $defaultLang) { echo $form->label('Search.lang'); -echo $form->radio('Search.lang', array( $this->params['lang'] => $this->params['lang'], 'en' => 'en'), array('default' => $this->params['lang'])); +echo $form->radio('Search.lang', array( $this->params['lang'] => $this->params['lang'], $defaultLang => $defaultLang), array('default' => $this->params['lang'])); } echo $form->end(__('Search', true)); ?> diff --git a/views/elements/secondary_nav.ctp b/views/elements/secondary_nav.ctp index dde1180..ab72763 100644 --- a/views/elements/secondary_nav.ctp +++ b/views/elements/secondary_nav.ctp @@ -1,28 +1,22 @@ -<?php /* SVN FILE: $Id: secondary_nav.ctp 705 2008-11-19 12:15:50Z AD7six $ */ ?> <div id="secondary_nav"> <ul class="navigation"> - <li><?php - if ($this->params['lang'] != 'en') { - $stats = '/' . $this->params['lang'] . '/stats#' . $this->params['lang']; - } else { - $stats = '/stats'; - } - echo $html->link(__('Top Contributors', true), $stats); - ?></li> - <li><?php - echo $html->link(__('todo', true), array('controller' => 'nodes', 'action' => 'todo')); - ?></li> <?php - if ($session->read('Auth.User.id')) { - echo '<li>' . $html->link(sprintf(__('Logged in as %s', true), $session->read('Auth.User.username')), '#') . '</li>'; - echo '<li>' . $html->link(__('Logout', true), array('controller' => 'users', 'action' => 'logout')) . '</li>'; + if ($session->read('Auth.User.id')) { + echo '<li>' . $html->link(sprintf(__('Logged in as %s', true), $session->read('Auth.User.username')), '#', array('id' => 'loggedInAs')) . '</li>'; + echo '<li>' . $html->link(__('Logout', true), array('plugin' => 'users', 'controller' => 'users', 'action' => 'logout')) . '</li>'; if ($session->read('Auth.User.Level') === ADMIN) { - echo '<li>' . $html->link('Admin', '/admin') . '</li>'; + echo '<li>' . $html->link('Admin', array('plugin' => null, 'admin' => true, 'controller' => 'revisions', 'action' => 'pending')) . '</li>'; } } else { - echo '<li>' . $html->link(__('Login', true), '/users/login') . '</li>'; + echo '<li>' . $html->link(__('Login', true), array('plugin' => 'users', 'controller' => 'users', 'action' => 'login')) . '</li>'; } ?> + <li><?php + echo $html->link(__('Top Contributors', true), array('plugin' => null, 'controller' => 'nodes', 'action' => 'stats', '#' => $this->params['lang'])); + ?></li> + <li><?php + echo $html->link(__('Todo', true), array('plugin' => null, 'controller' => 'nodes', 'action' => 'todo')); + ?></li> <li><a href="http://cakephp.org/"><?php __('About CakePHP') ?></a></li> <li><a href="http://cakefoundation.org/pages/donations"><?php __('Donate') ?></a></li> </ul> diff --git a/views/elements/side_menu.ctp b/views/elements/side_menu.ctp index 5152706..438c759 100644 --- a/views/elements/side_menu.ctp +++ b/views/elements/side_menu.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: side_menu.ctp 672 2008-10-06 14:03:23Z AD7six $ */ +<?php if ($this->name == 'Users') { echo $this->element('login_hint'); } @@ -12,7 +12,7 @@ if (!$this->name && !empty($this->data['Node'])) { $menu->add(array( 'section' => 'Options', 'title' => __('All in one page', true), - 'url' => array('controller' => 'nodes', 'action' => 'single_page', $id, $slug) + 'url' => array('controller' => 'nodes', 'action' => 'complete', $id, $slug) )); } $authLevel = $session->read('Auth.User.Level'); diff --git a/views/elements/sites_nav.ctp b/views/elements/sites_nav.ctp index 5e6ae10..2a2ab68 100644 --- a/views/elements/sites_nav.ctp +++ b/views/elements/sites_nav.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: sites_nav.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <div id="sites_nav"> <ul class="navigation"> <li class="current"><a href="http://cakephp.org/">CakePHP</a></li> diff --git a/views/elements/toc.ctp b/views/elements/toc.ctp index bae6667..364e479 100644 --- a/views/elements/toc.ctp +++ b/views/elements/toc.ctp @@ -1,9 +1,11 @@ -<?php /* SVN FILE: $Id: toc.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <div id="toc" class="context-menu toc tree"> <?php -$url = array('admin' => false, 'controller' => 'nodes', 'action' => 'toc', $data['Node']['Node']['id'], 'lang' => $this->params['lang']); -$url = str_replace($this->base, '', Router::url($url)); +$url = array('plugin' => null, 'prefix' => null, 'controller' => 'nodes', 'action' => 'toc', $data['Node']['Node']['id'], 'lang' => $this->params['lang']); +//$url = str_replace($this->base, '', Router::url($url)); +$__cache = Configure::read('Cache.check'); +Configure::write('Cache.check', false); $data = $this->requestAction($url, array('currentPath' => $currentPath, 'currentNode' => $currentNode)); +Configure::write('Cache.check', $__cache); $i = false; $title = ''; if (isset($currentPath[2])) { diff --git a/views/elements/toc/admin_item.ctp b/views/elements/toc/admin_item.ctp index e11620c..aed2c72 100644 --- a/views/elements/toc/admin_item.ctp +++ b/views/elements/toc/admin_item.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: admin_item.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php extract($data); extract($Revision); extract($Node); diff --git a/views/elements/toc/public_item.ctp b/views/elements/toc/public_item.ctp index 9e5a81d..5655d8a 100644 --- a/views/elements/toc/public_item.ctp +++ b/views/elements/toc/public_item.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: public_item.ctp 616 2008-08-20 17:13:45Z AD7six $ */ +<?php $params = array(); extract($data); if (!isset($pathIds) && isset ($currentPath)) { @@ -12,7 +12,7 @@ if (isset($pathIds)) { $params['class'] = 'selected'; } } -if ($this->action == 'single_page' && $Node['lft'] >= $currentNode['lft'] && $Node['rght'] <= $currentNode['rght']) { +if ($this->action == 'complete' && $Node['lft'] >= $currentNode['lft'] && $Node['rght'] <= $currentNode['rght']) { echo $html->link($Node['sequence'] . ' ' . $Revision['title'], '#' . $Revision['slug'] . '-' . $Node['id'], $params); return; diff --git a/views/helpers/highlight.php b/views/helpers/highlight.php index 12f24b4..7d862f0 100644 --- a/views/helpers/highlight.php +++ b/views/helpers/highlight.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: highlight.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for highlight.php * @@ -18,9 +17,6 @@ * @package cookbook * @subpackage cookbook.views.helpers * @since 1.0 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/views/helpers/menu.php b/views/helpers/menu.php index 7219a6d..6573795 100644 --- a/views/helpers/menu.php +++ b/views/helpers/menu.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: menu.php 699 2008-11-19 12:11:38Z AD7six $ */ /** * Short description for menu.php * @@ -18,9 +17,6 @@ * @package base * @subpackage base.views.helpers * @since v 1.0 - * @version $Revision: 699 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-19 13:11:38 +0100 (Wed, 19 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/views/helpers/theme.php b/views/helpers/theme.php new file mode 100644 index 0000000..ae90585 --- /dev/null +++ b/views/helpers/theme.php @@ -0,0 +1,48 @@ +<?php +/** + * ThemeHelper class + * + * A helper to correct links embedded in contents to stay within the current theme + * + * @uses AppHelper + * @package cakebook + * @subpackage cakebook.views.helpers + */ +class ThemeHelper extends AppHelper { +/** + * name property + * + * @var string 'Theme' + * @access public + */ + var $name = 'Theme'; +/** + * helpers property + * + * @var array + * @access public + */ + var $helpers = array('Html'); +/** + * out method + * + * @param mixed $html + * @return void + * @access public + */ + function out($html) { + // TODO Identify why this is problematic + //$html = $this->Html->clean($html); + if ($this->params['theme'] === 'default') { + return $html; + } + $root = trim(Router::url('/'), '/'); + if ($root) { + $root .= '/'; + } + $find = '@href="/' . $root . '@'; + $replace = 'href="/' . $root . $this->params['theme'][0] . '/'; + $html = preg_replace($find, $replace, $html); + return $html; + } +} \ No newline at end of file diff --git a/views/helpers/tree.php b/views/helpers/tree.php index 08cd883..4ff62f2 100644 --- a/views/helpers/tree.php +++ b/views/helpers/tree.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: tree.php 699 2008-11-19 12:11:38Z AD7six $ */ /** * Tree Helper. * @@ -18,9 +17,6 @@ * @package base * @subpackage base.views.helpers * @since v 1.0 - * @version $Revision: 699 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-19 13:11:38 +0100 (Wed, 19 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/views/layouts/default.ctp b/views/layouts/default.ctp index dab55fb..bc53d41 100644 --- a/views/layouts/default.ctp +++ b/views/layouts/default.ctp @@ -1,13 +1,22 @@ -<?php /* SVN FILE: $Id: default.ctp 702 2008-11-19 12:13:02Z AD7six $ */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<cake:nocache> <html xmlns="http://www.w3.org/1999/xhtml"> <head> +<?php +// Preventing automatic language detection +Configure::write('Config.language', $this->params['lang']); +?> +</cake:nocache> <?php echo $html->charset('UTF-8'); $app = cache('views/app_name_' . $this->params['lang']); if ($app) { $app = unserialize($app); } else { - $app = $this->requestAction('/nodes/app_name/' . $this->params['lang']); + $__cache = Configure::read('Cache.check'); + Configure::write('Cache.check', false); + $app = $this->requestAction(array('plugin' => null, 'prefix' => null, 'controller' => 'nodes', + 'action' => 'app_name', 'lang' => $this->params['lang'])); + Configure::write('Cache.check', $__cache); } if ($this->here == $this->webroot) { $title_for_layout = $app['tag_line']; @@ -24,22 +33,22 @@ echo $html->meta( <?php echo $html->meta( 'rss', - array('admin' => false, 'plugin' => false, 'controller' => 'changes', 'action' => 'index', 'ext' => 'rss'), + array('admin' => false, 'plugin' => null, 'controller' => 'changes', 'action' => 'index', 'ext' => 'rss'), array('title' => __('Recent Changes', true)) ); echo $html->meta( 'rss', - array('admin' => false, 'plugin' => false, 'controller' => 'changes', 'action' => 'index', 'language' => '*', 'ext' => 'rss'), + $html->url(array('admin' => false, 'plugin' => null, 'controller' => 'changes', 'action' => 'index')) . '/language:*.rss', array('title' => __('Recent Changes for all languages', true)) ); echo $html->meta( 'rss', - array('admin' => false, 'plugin' => false, 'controller' => 'comments', 'action' => 'recent', 'ext' => 'rss'), + array('admin' => false, 'plugin' => null, 'controller' => 'comments', 'action' => 'recent', 'ext' => 'rss'), array('title' => __('Recent comments', true)) ); echo $html->meta( 'rss', - array('admin' => false, 'plugin' => false, 'controller' => 'comments', 'action' => 'recent', 'language' => '*', 'ext' => 'rss'), + $html->url(array('admin' => false, 'plugin' => null, 'controller' => 'comments', 'action' => 'recent')) . '/language:*.rss', array('title' => __('Recent Comments for all languages', true)) ); ?><cake:nocache><?php @@ -47,17 +56,17 @@ if ($session->read('Auth.User.id')) { $userName = $session->read('Auth.User.username'); echo $html->meta( 'rss', - array('admin' => false, 'plugin' => false, 'controller' => 'changes', 'action' => 'index', 'user' => $userName, 'language' => '*', 'ext' => 'rss'), + $html->url(array('admin' => false, 'plugin' => null, 'controller' => 'changes', 'action' => 'index')) . "/language:*/user:$userName.rss", array('title' => __('My Submissions', true)) ); $menu->add(array( 'section' => 'Feeds', 'title' => __('My Submissions', true), - 'url' => array('admin' => false, 'plugin' => false, 'controller' => 'changes', 'action' => 'index', 'user' => $userName, 'language' => '*', 'ext' => 'rss') + 'url' => $html->url(array('admin' => false, 'plugin' => null, 'controller' => 'changes', 'action' => 'index')) . "/language:*/user:$userName.rss", )); } ?></cake:nocache><?php -if (!isset($this->params['lang']) || $this->params['lang'] == 'en') { +if (!isset($this->params['lang']) || $this->params['lang'] === $defaultLang) { $base = $html->url('/'); } else { $base = $html->url('/' . $this->params['lang'] . '/'); @@ -71,10 +80,6 @@ if (isset ($javascript)) { echo $javascript->link('scripts.js?v=537'); } echo $scripts_for_layout; -if (Configure::read()) { - echo $html->css('development'); - echo $javascript->link('development'); -} ?> </head> <body> @@ -82,7 +87,7 @@ if (Configure::read()) { <div id="header"> <h1><?php $link = '/'; -if ($this->params['lang'] != 'en') { +if ($this->params['lang'] != $defaultLang) { $link .= $this->params['lang']; } echo $html->link(sprintf(__('Welcome to %s', true), $app['name']), $link); @@ -119,15 +124,13 @@ if ($this->name == 'Nodes' && isset($data['Node']['Node']) && !$isAdmin) { </div> <div id="footer"> - <p> - <span>Also available in: - <?php + <p><span><?php $url = $this->passedArgs; foreach (Configure::read('Languages.all') as $lang) { $url['lang'] = $lang; $languages[] = $html->link($lang, $url); } - echo implode (' &middot; ', $languages); + echo sprintf(__('Also available in %s', true), implode (' &middot; ', $languages)); ?></span> <?php echo ' &nbsp; '; echo $html->link( @@ -158,9 +161,6 @@ pageTracker._trackPageview(); </script> <?php endif; $this->set('data', false); $this->cache->data = false; -if (Configure::read()) { - echo $this->element('development'); -} ?> </body> </html> \ No newline at end of file diff --git a/views/layouts/error.ctp b/views/layouts/error.ctp index 04f39b7..a989dbf 100644 --- a/views/layouts/error.ctp +++ b/views/layouts/error.ctp @@ -1,9 +1,8 @@ -<?php /* SVN FILE: $Id: error.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> - <?php __('CakePHP: the rapid development php framework:'); ?> + <?php __('CakePHP: the rapid development php framework'); ?>: <?php echo $title_for_layout; ?> </title> <?php diff --git a/views/layouts/flash.ctp b/views/layouts/flash.ctp index 7ee878f..aeec33a 100644 --- a/views/layouts/flash.ctp +++ b/views/layouts/flash.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: flash.ctp 30 2007-01-14 03:20:46Z phpnut $ */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> diff --git a/views/layouts/mobile.ctp b/views/layouts/mobile.ctp new file mode 100644 index 0000000..4b28784 --- /dev/null +++ b/views/layouts/mobile.ctp @@ -0,0 +1,113 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <?php + echo $html->charset('UTF-8'); + $app = cache('views/app_name_' . $this->params['lang']); + if ($app) { + $app = unserialize($app); + } else { + $__cache = Configure::read('Cache.check'); + Configure::write('Cache.check', false); + $app = $this->requestAction(array('plugin' => null, 'prefix' => null, 'controller' => 'nodes', + 'action' => 'app_name', 'lang' => $this->params['lang'])); + Configure::write('Cache.check', $__cache); + } + if ($this->here == $this->webroot) { + $title_for_layout = $app['tag_line']; + } + echo $html->meta( + 'keywords', + 'CakePHP Documentation, ' . str_replace(' :: ', ', ', $title_for_layout) + ); + ?> + <title><?php echo ($title_for_layout ? $title_for_layout : $app['tag_line']) . ' :: ' . $app['name']; ?></title> + <?php echo $html->css(array('yui.reset-fonts-grids', 'cake.cookbook.mobile'), 'stylesheet', array('media' => 'screen')); ?> + <link rel="apple-touch-icon" href="<?php e($this->base.'/img/iphone.png'); ?>"/> + <style type="text/css"> + body{font-size:40px} + #ft #copy p, #ft #secondary_nav ul, #ft #csf, #ft #img {float: none; display:block; text-align:center } + #ft #img {padding-top: 0;} + #ft #img a {display: block; text-align: center; } + #ft #img img { width: 28%; margin: 0 auto; display:block} + #ft #csf { padding: 1em 0; } + #search_row fieldset { width: 70%; padding-top: 0.2em; padding-right: 0.4em } + #search_row input.query { padding: 0.2em } + </style> +</head> +<body> + <div id="doc3"> + + <div id="hd"> + <h1>CakePHP Cookbook <sup>mobile!</sup></h1> + </div> + <div id="bd"> + <div class="yui-g" id="collections_row"> + <?php e($this->element('collections')); ?> + </div> + <div class="yui-g" id="search_row"> + <?php e($this->element('search')); ?> + </div> + + <!-- + <div class="yui-g" id="crumb_row"> + <?php e($this->element('crumbs')); ?> + </div> + --> + + <div class="yui-g" id="document"> + + <cake:nocache><?php + if($session->check('Message.auth')): + $session->flash('auth'); + endif; + + if($session->check('Message.flash')): + $session->flash(); + endif; + ?></cake:nocache> + + <?php e($content_for_layout); ?> + </div> + + <div class="yui-gc" id="document_menu"> + <div class="yui-u first"> + <?php + if ($this->name == 'Nodes' && isset($data['Node']['Node']) && !$isAdmin) { + $url = $html->url(array('admin' => false, 'controller' => 'nodes', 'action' => 'toc', $data['Node']['Node']['id'])); + echo $this->element('toc'); + } + ?> + </div> + <div class="yui-u"> + <cake:nocache> <?php echo $this->element('side_menu'); ?></cake:nocache> + </div> + </div> + + + </div> + </div> + <div id="ft"> + + <cake:nocache> <?php echo $this->element('secondary_nav'); ?></cake:nocache> + + <div id="copy"> + <p id="img"><?php echo ' &nbsp; '; + echo $html->link( + $html->image('cake.power.gif', array('alt'=>"CakePHP: the PHP Rapid Development Framework")), + 'http://www.cakephp.org/', + null, + null, + false + ); + ?> + <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/"> + <?php echo $html->image('license.png', array('alt' => "Creative Commons License")); ?> + </a> + </p> + <p id="csf">&copy; <a href="http://cakefoundation.org">Cake Software Foundation, Inc.</a></p> + </div> + </div> + </div> +</body> +</html> \ No newline at end of file diff --git a/views/layouts/rss/default.ctp b/views/layouts/rss/default.ctp index a980dd3..9e53750 100644 --- a/views/layouts/rss/default.ctp +++ b/views/layouts/rss/default.ctp @@ -1,5 +1,4 @@ -<?php /* SVN FILE: $Id: default.ctp 611 2008-08-19 15:39:29Z AD7six $ */ ?> -<cake:nocache><?php header('Content-type: application/xhtml-xml'); ?></cake:nocache><?php +<cake:nocache><?php header('Content-type: application/rss-xml'); ?></cake:nocache><?php echo $rss->header(); if (!isset($channel)) { diff --git a/views/nodes/add.ctp b/views/nodes/add.ctp index 935efad..80d8d3f 100755 --- a/views/nodes/add.ctp +++ b/views/nodes/add.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: add.ctp 672 2008-10-06 14:03:23Z AD7six $ */ ?> <div class="nodes add"> <?php $contents = ''; diff --git a/views/nodes/admin_edit.ctp b/views/nodes/admin_edit.ctp index 0a14068..23a87ed 100644 --- a/views/nodes/admin_edit.ctp +++ b/views/nodes/admin_edit.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_edit.ctp 672 2008-10-06 14:03:23Z AD7six $ */ ?> <div> <h2>Properties for <?php echo $this->data['Revision']['title']; ?></h2> <?php @@ -22,4 +21,4 @@ echo $form->inputs(array ( echo $form->submit('save'); echo $form->end(); ?> -</div> +</div> \ No newline at end of file diff --git a/views/nodes/admin_import.ctp b/views/nodes/admin_import.ctp index 042a8fe..d626935 100644 --- a/views/nodes/admin_import.ctp +++ b/views/nodes/admin_import.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: admin_import.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php echo $form->create(null, array('type' => 'file', 'url' => '/' . $this->params['url']['url'])); echo $form->inputs(array( 'legend' => 'Import contents from another install, or restore to a previous backup', @@ -11,4 +11,4 @@ echo $form->inputs(array( )); echo $form->submit(); echo $form->end(); -?> +?> \ No newline at end of file diff --git a/views/nodes/admin_index.ctp b/views/nodes/admin_index.ctp index 6525ec4..96f9283 100755 --- a/views/nodes/admin_index.ctp +++ b/views/nodes/admin_index.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_index.ctp 673 2008-10-06 14:05:17Z AD7six $ */ ?> <h1>Nodes</h1> <div class="container"> <?php diff --git a/views/nodes/admin_merge.ctp b/views/nodes/admin_merge.ctp index f37dc76..b7051d4 100644 --- a/views/nodes/admin_merge.ctp +++ b/views/nodes/admin_merge.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: admin_merge.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php if (isset($preview)) : ?> <div id='preview' class="nodes view"> diff --git a/views/nodes/admin_move.ctp b/views/nodes/admin_move.ctp index b367bf7..71e3356 100644 --- a/views/nodes/admin_move.ctp +++ b/views/nodes/admin_move.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: admin_move.ctp 600 2008-08-07 17:55:23Z AD7six $ */ +<?php echo $form->create('Node', array('url' => '/' . $this->params['url']['url'])); echo $form->inputs(array( 'id' => array('options' => $nodes, 'label' => 'Move this', 'value' => $data['Node']['id']), diff --git a/views/nodes/edit.ctp b/views/nodes/edit.ctp index c1780a1..fefc59e 100755 --- a/views/nodes/edit.ctp +++ b/views/nodes/edit.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: edit.ctp 673 2008-10-06 14:05:17Z AD7six $ */ ?> <div class="nodes form"> <?php $contents = ''; diff --git a/views/nodes/english_todo.ctp b/views/nodes/english_todo.ctp index 40512fe..08b6ca6 100644 --- a/views/nodes/english_todo.ctp +++ b/views/nodes/english_todo.ctp @@ -1,8 +1,6 @@ -<?php /* SVN FILE: $Id: english_todo.ctp 707 2008-11-19 12:18:03Z AD7six $ */ ?> -<?php /* SVN FILE: $Id: english_todo.ctp 707 2008-11-19 12:18:03Z AD7six $ */ ?> <div class="nodes view"> <div class="summary"> -<p>These sections have been marked as needing updating</p> +<p>These sections have been marked as needing updating.</p> </div> <?php foreach ($data as $id => $row) { @@ -10,7 +8,7 @@ foreach ($data as $id => $row) { $sequence = $Node['sequence']; $sequence = $sequence?$sequence:'#'; echo "<h2 id=\"{$Revision['slug']}-{$Node['id']}\">" . - $html->link($sequence, '#' . $Revision['slug'] . '-' . $Node['id']) . ' ' . htmlspecialchars($Revision['title']) . "</h2>"; + $html->link($sequence, array('action' => 'view', $Node['id'], $Revision['slug'])) . ' ' . htmlspecialchars($Revision['title']) . "</h2>"; echo '<div class="options">'; echo $this->element('node_options', array('data' => $row)); diff --git a/views/nodes/history.ctp b/views/nodes/history.ctp index 12eb5d6..02a21aa 100644 --- a/views/nodes/history.ctp +++ b/views/nodes/history.ctp @@ -1,6 +1,5 @@ -<?php /* SVN FILE: $Id: history.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <h1>History</h1> -<?php if ($this->params['lang'] != 'en') { +<?php if ($this->params['lang'] != $defaultLang) { $url = $this->passedArgs; $url[] = 1; echo '<p>' . $html->link(__('See English edits too', true), $url) . '</p>'; @@ -23,7 +22,7 @@ echo $html->tableHeaders($th); foreach ($data as $row) { extract($row); $defaultReason = 'edit'; - if ($Revision['lang'] != 'en') { + if ($Revision['lang'] != $defaultLang) { $defaultReason = 'edit/translation'; } if ($Revision['status'] == 'pending') { diff --git a/views/nodes/rss/view_all.ctp b/views/nodes/rss/view_all.ctp index c491de3..e66ea53 100644 --- a/views/nodes/rss/view_all.ctp +++ b/views/nodes/rss/view_all.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: view_all.ctp 604 2008-08-11 14:46:35Z AD7six $ */ +<?php transformRSS (null, $html); echo $rss->items($data, 'transformRSS'); @@ -16,4 +16,4 @@ 'pubDate' => date('r', strtotime($Revision['modified'])), ); } -?> +?> \ No newline at end of file diff --git a/views/nodes/stats.ctp b/views/nodes/stats.ctp index 10ff97f..c4d0e07 100644 --- a/views/nodes/stats.ctp +++ b/views/nodes/stats.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: stats.ctp 708 2008-11-19 12:39:19Z AD7six $ */ ?> <div class="nodes view"> <h2>Statistics</h2> <div class="summary"> @@ -6,11 +5,11 @@ </div> <h3><?php echo sprintf(__('Top %s Contributors', true), 'EN') ?></h3> <div class="options"><ul class="node-options"> - <li><?php echo sprintf(__('Last update: %s', true), $time->niceShort($data['en']['last_update'])) ?></li> + <li><?php echo sprintf(__('Last update: %s', true), $time->niceShort($data[$defaultLang]['last_update'])) ?></li> </ul></div> <div class="summary"> <?php -foreach ($data['en']['top_contributors'] as $row) { +foreach ($data[$defaultLang]['top_contributors'] as $row) { if (isset($users[$row['Revision']['user_id']])) { $nick = $users[$row['Revision']['user_id']]['User']['username']; if ($users[$row['Revision']['user_id']]['Profile']['url']) { @@ -23,14 +22,14 @@ foreach ($data['en']['top_contributors'] as $row) { $url = 'http://bakery.cakephp.org/profiles/view/' . $row['Revision']['user_id'] . '/' . $nick; } $menu->add(array( - 'section' => 'en', + 'section' => $defaultLang, 'title' => sprintf(__('%s (%s current)', true), $nick, $row[0]['count']), 'url' => $url )); } -unset ($counts['en']); +unset ($counts[$defaultLang]); echo '<br style="clear:left" />'; -echo '<div class="userstats">' . $menu->generate('en', array('class' => 'stats', 'splitCount' => 3)) . '</div>'; +echo '<div class="userstats">' . $menu->generate($defaultLang, array('class' => 'stats', 'splitCount' => 3)) . '</div>'; echo '</div>'; foreach ($counts as $lang => $count) { $row = $data[$lang]; diff --git a/views/nodes/toc.ctp b/views/nodes/toc.ctp index faabc77..a22d4c9 100644 --- a/views/nodes/toc.ctp +++ b/views/nodes/toc.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: toc.ctp 673 2008-10-06 14:05:17Z AD7six $ */ ?> <div class="toc"> <?php echo '<h2>' . $data[0]['Revision']['title'] . '</h2>'; diff --git a/views/nodes/todo.ctp b/views/nodes/todo.ctp index 90531bb..4870b62 100644 --- a/views/nodes/todo.ctp +++ b/views/nodes/todo.ctp @@ -1,12 +1,16 @@ -<?php /* SVN FILE: $Id: todo.ctp 707 2008-11-19 12:18:03Z AD7six $ */ ?> <div class="nodes view"> <div class="summary"> <?php $i18n = I18n::getInstance(); -if (!file_exists(APP . 'locale' . DS . $i18n->l10n->locale . DS . 'LC_MESSAGES' . DS . 'default.po')) { - echo '<p class="note">' . sprintf(__('These is no <a href="%s">po file</a> for %s', true), $html->url('/default.pot'), $i18n->l10n->language) . '</p>'; +if (file_exists(APP . 'locale' . DS . $i18n->l10n->locale . DS . 'LC_MESSAGES' . DS . 'default.po')) { + echo '<p class="note">' . sprintf(__('Want to check or update the <a href="%s">po file</a> for %s?', true), + 'http://thechaw.com/cakebook/browser/locale/' . $i18n->l10n->locale . '/LC_MESSAGES/default.po', $i18n->l10n->language); +} else { + echo '<p class="warning">' . sprintf(__('These is no <a href="%s">po file</a> for %s', true), + 'http://thechaw.com/cakebook/browser/locale/eng/LC_MESSAGES/default.po', $i18n->l10n->language); } -echo __('These sections either do not have a translation, or the English text has changed since it was translated') . '</p>'; +echo '. ' . __('Please use <a href="http://www.poedit.net">Po Edit</a> when editing po files', true); +echo '</p><p>' . __('These sections either do not have a translation, or the English text has changed since it was translated', true) . '</p>'; ?> </div> <?php @@ -15,7 +19,7 @@ foreach ($data as $id => $row) { $sequence = $Node['sequence']; $sequence = $sequence?$sequence:'#'; echo "<h2 id=\"{$Revision['slug']}-{$Node['id']}\">" . - $html->link($sequence, '#' . $Revision['slug'] . '-' . $Node['id']) . ' ' . htmlspecialchars($Revision['title']) . "</h2>"; + $html->link($sequence, array('action' => 'view', $Node['id'], $Revision['slug'])) . ' ' . htmlspecialchars($Revision['title']) . "</h2>"; echo '<div class="options">'; echo $this->element('node_options', array('data' => $row)); diff --git a/views/nodes/view_all.ctp b/views/nodes/view_all.ctp index 6f9a517..ac2fc68 100644 --- a/views/nodes/view_all.ctp +++ b/views/nodes/view_all.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: view_all.ctp 706 2008-11-19 12:16:42Z AD7six $ */ +<?php if ($this->params['isAjax']) { echo $this->element('crumbs'); @@ -24,9 +24,7 @@ if ($this->params['isAjax']) { echo '</div>'; if (trim(html_entity_decode(strip_tags(str_replace('&nbsp;', '', $currentNode['Revision']['content'])))) != '') { echo '<div class="summary">'; - // TODO Identify why this is problematic - //echo $html->clean($currentNode['Revision']['content']); - echo $currentNode['Revision']['content']; + echo $theme->out($currentNode['Revision']['content']); echo '</div>'; echo $html->meta( 'description', @@ -57,9 +55,7 @@ if ($this->params['isAjax']) { if (trim(html_entity_decode(strip_tags(str_replace('&nbsp;', '', $Revision['content'])))) != '') { echo '<div class="body">'; - // TODO Identify why this is problematic - //echo $html->clean($Revision['content']); - echo $Revision['content']; + echo $theme->out($Revision['content']); echo '</div>'; } echo '<div class="comments" id="comments-' . $Node['id'] . '">'; @@ -93,7 +89,7 @@ if ($currentNode['Node']['depth'] > 1 && $currentNode['Node']['depth'] < $viewAl $menu->add(array( 'section' => 'Options', 'title' => __('All in one page', true), - 'url' => array('action' => 'single_page', $currentNode['Node']['id'], $currentNode['Revision']['slug']) + 'url' => array('action' => 'complete', $currentNode['Node']['id'], $currentNode['Revision']['slug']) )); } if ($currentNode['Node']['edit_level'] <= $auth['User']['Level']) { @@ -106,11 +102,11 @@ if ($currentNode['Node']['edit_level'] <= $auth['User']['Level']) { extract($this->data); $html->meta( 'rss', - array('plugin' => false, 'controller' => 'comments', 'action' => 'index', $Node['id'], $Revision['slug'], 'ext' => 'rss'), + array('theme' => 'default', 'plugin' => null, 'controller' => 'comments', 'action' => 'index', $Node['id'], $Revision['slug'], 'ext' => 'rss'), array('title' => sprintf(__('Comments for %s', true), $Revision['title'])) , false); $html->meta('rss', - array('plugin' => false, 'controller' => 'changes', 'action' => 'index', $Node['id'], 'ext' => 'rss'), + array('theme' => 'default', 'plugin' => null, 'controller' => 'changes', 'action' => 'index', $Node['id'], 'ext' => 'rss'), array('title' => sprintf(__('Change history for %s', true), $Revision['title'])) , false); ?><cake:nocache> <?php @@ -118,12 +114,12 @@ extract($this->data); $menu->add(array( 'section' => 'Feeds', 'title' => sprintf(__('Comments for %s', true), $Revision['title']), - 'url' => array('plugin' => false, 'controller' => 'comments', 'action' => 'index', $Node['id'], $Revision['slug'], 'ext' => 'rss'), + 'url' => array('theme' => 'default', 'plugin' => null, 'controller' => 'comments', 'action' => 'index', $Node['id'], $Revision['slug'], 'ext' => 'rss'), )); $menu->add(array( 'section' => 'Feeds', 'title' => sprintf(__('Change history for %s', true), $Revision['title']), - 'url' => array('plugin' => false, 'controller' => 'changes', 'action' => 'index', $Node['id'], 'ext' => 'rss'), + 'url' => array('theme' => 'default', 'plugin' => null, 'controller' => 'changes', 'action' => 'index', $Node['id'], 'ext' => 'rss'), )); ?></cake:nocache> \ No newline at end of file diff --git a/views/nodes/xml/view_all.ctp b/views/nodes/xml/view_all.ctp index aa60323..0657f08 100644 --- a/views/nodes/xml/view_all.ctp +++ b/views/nodes/xml/view_all.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: view_all.ctp 607 2008-08-19 15:36:49Z AD7six $ */ +<?php $uuid = String::uuid(); $key = array_pop(explode('-', $uuid)); $content = $xml->serialize(array('meta' => array( diff --git a/views/revisions/admin_change_status.ctp b/views/revisions/admin_change_status.ctp index 8522321..0f39e30 100644 --- a/views/revisions/admin_change_status.ctp +++ b/views/revisions/admin_change_status.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_change_status.ctp 600 2008-08-07 17:55:23Z AD7six $ */ ?> <h1><?php echo str_replace('admin_', '', $this->action) ?> Revision</h1> <?php echo $form->create(null, array('url' => '/' . $this->params['url']['url'])); diff --git a/views/revisions/admin_edit.ctp b/views/revisions/admin_edit.ctp index 297f212..047d904 100755 --- a/views/revisions/admin_edit.ctp +++ b/views/revisions/admin_edit.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_edit.ctp 673 2008-10-06 14:05:17Z AD7six $ */ ?> <h1>Revisions - edit Revision </h1> <div class="form-container"> <?php diff --git a/views/revisions/admin_history.ctp b/views/revisions/admin_history.ctp index 6f13776..d59b255 100755 --- a/views/revisions/admin_history.ctp +++ b/views/revisions/admin_history.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_history.ctp 673 2008-10-06 14:05:17Z AD7six $ */ ?> <h1>History</h1> <div class="container"> <table> diff --git a/views/revisions/admin_index.ctp b/views/revisions/admin_index.ctp index c6e945c..56d3c37 100755 --- a/views/revisions/admin_index.ctp +++ b/views/revisions/admin_index.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id: admin_index.ctp 673 2008-10-06 14:05:17Z AD7six $ */ ?> <h1>Revisions</h1> <div class="container"> <?php echo $this->element('filter', array( diff --git a/views/revisions/admin_pending.ctp b/views/revisions/admin_pending.ctp index 5ba9631..22bdfff 100755 --- a/views/revisions/admin_pending.ctp +++ b/views/revisions/admin_pending.ctp @@ -1,7 +1,13 @@ -<?php /* SVN FILE: $Id: admin_pending.ctp 672 2008-10-06 14:03:23Z AD7six $ */ ?> -<h1>Pending Submissions</h1> +<h1>Pending <?php echo up($language) ?> Submissions</h1> <div class="container"> -<?php echo +<?php +$links = array(); +foreach ($counts as $lang => $count) { + $links[] = $html->link(sprintf(__n('%s pending %s submission', '%s pending %s submissions', $count, true), $count, up($lang)), array('lang' => $lang)); +} +if ($links) { + echo '<p>' . implode($links, ', ') . '</p>'; +} $this->set('modelClass', 'Revision'); $this->element('filter', array('filters' => array( 'Node.sequence', @@ -19,7 +25,6 @@ $th = array( 'Book', $paginator->sort('Section', 'Node.sequence'), $paginator->sort('Title', 'slug'), - $paginator->sort('lang'), $paginator->sort('User','User.username'), $paginator->sort('Email', 'User.email'), $paginator->sort('created'), @@ -58,7 +63,6 @@ foreach ($data as $row) { $book . ' (' . $collection . ')', $sequence, $html->link($Revision['title'],array('action'=>'view',$Revision['id'])), - $html->link($Revision['lang'], am($pass, array('page' => 1, 'lang' => $Revision['lang']))), $User?$html->link($User['username'], am($pass, array('page' => 1, 'user_id' => $Revision['user_id']))):'', $User?'<a href="mailto:' . $User['email'] . '">' . $User['email'] . '</a>':'', $html->link($Revision['created'], am($pass, array('page' => 1, 'created' => $Revision['created']))), diff --git a/views/revisions/admin_view.ctp b/views/revisions/admin_view.ctp index e0ae43c..da22ef2 100755 --- a/views/revisions/admin_view.ctp +++ b/views/revisions/admin_view.ctp @@ -1,11 +1,17 @@ -<?php /* SVN FILE: $Id: admin_view.ctp 698 2008-11-19 08:53:30Z AD7six $ */ ?> <div class="revisions view"> <?php echo '<h2>Revision Details</h2>'; if(empty($data['Revision']['node_id']) && !empty($data['Revision']['under_node_id'])) { - echo '<p>A new section under '.$data['UnderNode']['sequence'].' after '.$data['AfterNode']['sequence']. '</p>'; + echo '<p>A new section under ' + . $html->link($data['UnderNode']['sequence'], array('admin' => false, 'controller' => 'nodes', 'action' => 'view', $data['UnderNode']['id'])) + . ' after '.$data['AfterNode']['sequence']. '</p>'; } -echo '<p>' . up($data['Revision']['lang']) . ' Submission by ' . $html->link($user['username'], 'mailto:' . $user['email']) . ' ' . $time->timeAgoInWords($data['Revision']['created']) . '</p>'; +echo '<p>' . up($data['Revision']['lang']) . + ' Submission by ' . + $html->link($user['username'], 'mailto:' . $user['email']) . ' to ' . + $html->link($data['Node']['sequence'] . ' ' . $data['Revision']['title'], + array('admin' => false, 'controller' => 'nodes', 'action' => 'view', 'lang' => $data['Revision']['lang'], $data['Node']['id'])) . ' ' . + $time->timeAgoInWords($data['Revision']['created']) . '</p>'; if(!empty($data['Revision']['reason'])) { echo '<p>Reason: ' . htmlspecialchars($data['Revision']['reason']) . '</p>'; } diff --git a/views/revisions/results.ctp b/views/revisions/results.ctp index f4e55fe..606e3ac 100644 --- a/views/revisions/results.ctp +++ b/views/revisions/results.ctp @@ -1,4 +1,4 @@ -<?php /* SVN FILE: $Id: results.ctp 673 2008-10-06 14:05:17Z AD7six $ */ +<?php //echo $this->element('search_form'); echo '<div class="searchresults">'; if(!empty($results)){ diff --git a/webroot/css.php b/webroot/css.php index bc99078..3ca8f32 100644 --- a/webroot/css.php +++ b/webroot/css.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: css.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -21,9 +20,6 @@ * @package cake * @subpackage cake.app.webroot * @since CakePHP v 0.2.9 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/webroot/css/cake.cookbook.css b/webroot/css/cake.cookbook.css index 9286d05..b896100 100644 --- a/webroot/css/cake.cookbook.css +++ b/webroot/css/cake.cookbook.css @@ -400,4 +400,7 @@ table tr th, table tr td {padding:5px; border:1px solid #DDD;} a.selected { background: #ddd; padding:0.2em; +} +a#loggedInAs { + color: #fff; } \ No newline at end of file diff --git a/webroot/css/cake.cookbook.mobile.css b/webroot/css/cake.cookbook.mobile.css new file mode 100644 index 0000000..2caf9ff --- /dev/null +++ b/webroot/css/cake.cookbook.mobile.css @@ -0,0 +1,650 @@ + +/* Layout */ +html { + background: #003d4c; + color: #fff; +} + +body { + background: #fff; + color: #000; +} + +#hd { + background: #003d4c url(images/body_bg.gif) repeat-x; + color: #fff; + padding: 1em; +} + +#doc3 { + margin: 0; +} + +/* Links */ +a:link { + color: #CF7933; +} + +a:visited { + color: #8F7159; +} + +/* Headings */ +h1 { + font-size: 160%; + color: white; +} + +h1 a,h1 a:link,h1 a:visited { + color: white; + text-decoration: none; +} + +h1 sup { + font-style: italic; +} + +h2 { + color: #EE3322; + font-size: 150%; + font-weight: bold; +} + +h3,h4,h5 { + margin-top: 2em; + font-size: 100%; + font-weight: bold; + color: #fff; + background: #CCCC66; + padding: 0.4em; +} + +h3 a,h4 a,h5 a { + color: #F03322 ! important; + text-decoration: none; +} + +h4,h5 { + font-weight: bold; + margin-bottom: 0.5em; + font-size: 110%; +} + +/* Code Highlight */ + + +pre { + overflow: auto; +} + +pre.code { + display: none; + background: #F0F0F0; + padding: 1em 30px; + line-height: 1.1em; +} + +pre.diff { + width: 100em; +} + +pre.shell { + background: black; + color: white; + font: monospace; +} + +ol.code { + margin: 0 0 1em; + padding: 0; + font-size: 0.75em; + line-height: 1.8em; + color: #939399; + text-align: left; + list-style-position: inside; + border: 1px solid #d3d3d0; +} + +ol.code li { + margin: 0; + padding: 0 0 0 1%; +} + +ol.code li.even { + +} + +ol.code li code { + font: 1.2em courier, monospace; + color: #c30; + padding-left: 0.5em; +} + +.code .comment { + color: #939399; +} + +.code .default { + color: #44c; +} + +.code .keyword { + color: #373; +} + +.code .string { + color: #c30; +} + +/* Forms */ +#document form { + clear: none; +} + +#document fieldset { + margin-top: 20px; + border: 1px solid #ccc; + padding: 16px 20px; +} + +#document fieldset legend { + color: #003d4c; + font-size: 160%; + font-weight: bold; +} + +#document fieldset fieldset legend { + font-size: 120%; + font-weight: normal; +} + +#document form div { + clear: left; + margin-bottom: 1em; + padding: .5em; + vertical-align: text-top; +} + +#document form div.required { + color: #333; + font-weight: bold; +} + +#document form div.optional,form div.input { + color: #444; +} + +#document form div.submit { + border: 0; + clear: left; + margin-top: 10px; + margin-left: 140px; +} + +#document label { + display: block; + font-size: 110%; + padding-right: 20px; +} + +#document label em { + font-size: 82%; + font-weight: normal; +} + +#document input,textarea { + clear: left; + display: block; + font-size: 140%; + font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif; + padding: 2px; + width: 100%; +} + +#document select { + clear: both; + font-size: 120%; + vertical-align: text-bottom; +} + +#document select[multiple=multiple] { + width: 100%; +} + +#document option { + font-size: 120%; + padding: 0 3px; +} + +#document input[type=checkbox] { + clear: left; + float: left; + margin: 0px 6px 7px 2px; + width: auto; +} + +#document input[type=submit] { + display: inline; + padding: 2px 5px; + width: auto; + font-size: 110%; + vertical-align: bottom; +} + +/* Rows */ +#search_row,#crumb_row,#collections_row { + padding-left: 1em; +} + +/* Collection Row */ +#collections_row { + background: #CCCC66; + border-top: thick solid #000; + padding-bottom: 0.4em; +} + +#collections_row li a { + display: block; + float: left; + padding: 0.3em 0.5em; + background: #000; + color: #fff; + text-decoration: none; + margin-right: 1em; +} + +/* Crumb Row */ +#crumb_row { + padding: 0.5em +} + +#crumb_row a { + padding: 0.5em; +} + +/* Search Row */ +#search_row { + background: #ffa; + padding-top: 0.5em; + padding-bottom: 0.5em; +} + +#search_row fieldset { + width: 90%; + float: left; +} + +#search_row input.query { + width: 96%; + padding: 0.1em; +} + +/* Document */ +#document { + clear: both; + padding: 1em; + padding-bottom: 0em; +} + +/* Document Elements */ +#document div.summary,#document div.body { + margin-bottom: 1em; +} + +#document div.options { + margin-bottom: 1em; +} + +#document div.options ul { + padding: 0; +} + +#document div.options li { + display: inline; + font-size: 80%; + padding-right: 0.5em; +} + +#document div.node-nav { + padding: 1em 0; + text-align: center; + margin-top: 1em; +} + +#document div.comments { + display: none; +} + +#document ol, #document ul { + padding-left: 1.5em; +} + +#document ol li { + list-style: decimal +} + +#document ul li { + list-style: disc; +} + + +#document pre.code { + display: none; +} + +#document pre { + padding: 0.4em; + background: #f6f6f6; +} + +#document ol.code { + padding: 0; + margin: 0; + list-style: none; + padding: 0; + margin: 1em 0; +} + +#document ol.code li { + list-style: none; +} + +/* Document Menu */ +#document_menu { + border-top: thick solid #EE3322; + padding: 1em 0; + background: #FF8929 url(../img/orange.png) repeat-x; +} + +#document_menu #toc { + padding-left: 1em; +} + +#document_menu h4 { + margin-top: 0 ! important; + padding: 0 ! important; + color: #000 ! important; + background: none ! important; +} + +#document_menu #toc h4 a { + color: #fff; +} + +#document_menu #toc li.active a { + font-weight: bold ! important; +} + +#document_menu div.context-menu { + padding-bottom: 1em; +} + +#document_menu div.context-menu a { + text-decoration: none; + color: #fff; +} + +#document_menu div.context-menu li { + padding-bottom: 0.4em; + color: #fff; +} + +/* Footer */ +#ft { + background: #003d4c; + padding-top: 0.4em; + border-top: thick solid #CCCC66 +} + +#ft,#ft a { + color: #CCCC66; +} + +#ft #secondary_nav ul { + float: left; + padding-left: 1em; +} + +#ft #secondary_nav li { + display: inline; + padding-right: 0.4em; + font-size: 80% +} + +#ft #copy { + font-size: 80% +} + +#ft #copy p { + float: right; +} + +big.notmobile { + margin-top: 1em; + background: #ffa; + color: #AF0000; + display: block; + padding: 1em; + font-weight: bold; +} + +/* FROM ORIGINAL COOKBOOK CSS */ +span.search_term_0 { + background-color: #66ffff; + color: black; +} + +span.search_term_1 { + background-color: #ff66ff; + color: black; +} + +span.search_term_2 { + background-color: #ffff66; + color: black; +} + +span.search_term_3 { + background-color: #ff8888; + color: black; +} + +span.search_term_4 { + background-color: #88ff88; + color: black; +} + +span.search_term_5 { + background-color: #8888ff; + color: black; +} + +span.search_term_6 { + background-color: #88dddd; + color: black; +} + +span.search_term_7 { + background-color: #dd88dd; + color: black; +} + +span.search_term_8 { + background-color: #dddd88; + color: black; +} + +span.search_term_9 { + background-color: #aaddff; + color: black; +} + +span.search_term_10 { + background-color: #aaffdd; + color: black; +} + +span.search_term_11 { + background-color: #ddaaff; + color: black; +} + +#results { + margin-right: 3em; +} + +#results dt { + margin: 1.5em 0pt 0pt; +} + +#results dt a { + color: #3333CC; +} + +#results dd { + font-size: 80%; + margin: 0pt; + padding: 0pt; +} + +#results .author,#results .date,#results .keywords { + color: #009900; +} + +.admin { + color: #993; +} + + +.warning { + margin: 1em 0; + padding: 10px 10px 10px 35px; + background: #FEE url(images/24-message-warn.png) no-repeat 7px 7px; + border: 1px solid #900; +} + +.note { + margin: 1em 0; + padding: 10px 10px 10px 35px; + background: #FFB url(images/24-message-info.png) no-repeat 7px 7px; + border: 1px solid #CC6; +} + +.method { + margin: 1em 0; + font-weight: bold; + font-size: 14px; + margin-left: 20px +} + +/* Tables */ +table { + background-color: #fff; + border-top: 1px solid #ccc; + border-left: 1px solid #ccc; + border-bottom: 1px solid #ccc; + color: #333; + margin-bottom: 10px; + clear: both; + width: 100%; +} + +table.left { + clear: none; + width: 74%; +} + +th { + background-color: #f2f2f2; + border-top: 1px solid #fff; + border-left: 1px solid #fff; + border-right: 1px solid #bbb; + border-bottom: 1px solid #bbb; + text-align: left; +} + +th a { + display: block; + padding: 2px 4px; + text-decoration: none; +} + +th span { + display: block; + padding: 2px 4px; + text-decoration: none; +} + +th a:hover { + background-color: #ccc; + color: #333; + text-decoration: none; +} + +table tr td { + background: #fff; + border-right: 1px solid #ccc; + padding: 4px 6px; + text-align: left; + vertical-align: top; +} + +.altrow { + background: #f4f4f4; +} + +td.actions { + text-align: center; + white-space: nowrap; +} + +td.actions a { + display: inline; + margin: 0px 6px; +} + +table { + border-collapse: collapse; + clear: none; + width: 99% +} + +table tr th,table tr td { + padding: 5px; + border: 1px solid #DDD; +} + +/* DIFF */ +table.diff td.diffdeleted { + border-color: #F21515; +} + +table.diff td.diffadded { + border-color: #7AB317; +} + +table.diff td.diffdeleted span.diffchar { + background-color: #FFD3D2; +} + +table.diff td.diffadded span.diffchar { + background-color: #CAFFCF; +} + +dl#results dt.content a { + color: #EE3322; + font-size: 29px; + margin: 0.5em 0pt; +} + +/* Paging */ +div.paging { + margin-top: 20px; + color: #ccc; + margin-bottom: 2em; +} + +div.paging div.disabled { + color: #ddd; + display: inline; +} diff --git a/webroot/css/cake.generic.css b/webroot/css/cake.generic.css index 6492222..da8db6b 100644 --- a/webroot/css/cake.generic.css +++ b/webroot/css/cake.generic.css @@ -467,4 +467,4 @@ div.cake-code-dump pre, div.cake-code-dump pre code { } div.cake-code-dump span.code-highlight { background-color: #FFFF00; -} +} \ No newline at end of file diff --git a/webroot/css/live.css b/webroot/css/live.css index d72d99a..60d58f8 100644 --- a/webroot/css/live.css +++ b/webroot/css/live.css @@ -489,4 +489,4 @@ div.comments form div { ul li ul { padding-left: 1em; -} +} \ No newline at end of file diff --git a/webroot/css/print.css b/webroot/css/print.css index dc3eeed..e9d800c 100644 --- a/webroot/css/print.css +++ b/webroot/css/print.css @@ -70,4 +70,4 @@ ol.code li code { .code .comment { color: #939399; } .code .default { color: #44c; } .code .keyword { color: #373; } -.code .string { color: #c30; } +.code .string { color: #c30; } \ No newline at end of file diff --git a/webroot/css/yui.reset-fonts-grids.css b/webroot/css/yui.reset-fonts-grids.css new file mode 100644 index 0000000..b3e042c --- /dev/null +++ b/webroot/css/yui.reset-fonts-grids.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.6.0 +*/ +html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}del,ins{text-decoration:none;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}body{text-align:center;}#ft{clear:both;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;min-width:750px;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;} .yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#bd:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#bd,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;} \ No newline at end of file diff --git a/webroot/default.pot b/webroot/default.pot deleted file mode 120000 index 51aae1e..0000000 --- a/webroot/default.pot +++ /dev/null @@ -1 +0,0 @@ -../locale/default.pot \ No newline at end of file diff --git a/webroot/img/iphone.png b/webroot/img/iphone.png new file mode 100644 index 0000000..3ff52ef Binary files /dev/null and b/webroot/img/iphone.png differ diff --git a/webroot/img/orange.png b/webroot/img/orange.png new file mode 100644 index 0000000..9a756f8 Binary files /dev/null and b/webroot/img/orange.png differ diff --git a/webroot/index.php b/webroot/index.php index 0067c39..5de064e 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: index.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -21,9 +20,6 @@ * @package cake * @subpackage cake.app.webroot * @since CakePHP v 0.2.9 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/webroot/js/development.js b/webroot/js/development.js deleted file mode 100644 index 42ea2fb..0000000 --- a/webroot/js/development.js +++ /dev/null @@ -1,59 +0,0 @@ -$(function() { - /* Hide XDebug errors */ - $('table.xdebug-error').hide().before('<a href="#" class="debugToggle">Error Message! Show</a>'); - $('a.debugToggle').click(function(){ - if ($('a.debugToggle').next().toggle().is(':visible')) { - $(this).text('Hide Error'); - } else { - $(this).text('Show Error'); - } - return false; - }); - positionSqlLogs('outOfSight'); - $('.cake-sql-log').hover(function() { - $(this).addClass("hover"); - positionSqlLogs('visible', this); - },function(){ - $(this).removeClass("hover"); - positionSqlLogs('outOfSight'); - }); -}); -function positionSqlLogs(where, what) { - $('.cake-sql-log:first').ajaxStop(function() { - positionSqlLogs('outOfSight'); - }); - if (where == 'outOfSight') { - var zIndex = 100; - var count = 0; - $('.cake-sql-log').each(function() { - if (!$(this).parent().hasClass('sqlWrap')) { - $(this).wrap('<div class="sqlWrap">'); - } - $(this).css('left', '85%'); - $(this).css('z-index', zIndex); - if (count) { - $(this).css('bottom', count * 15 + 'px'); - } - count++; - zIndex--; - }); - } else if (what) { - $(what).css('left', 0); - $(what).css('bottom', 0); - $(what).css('z-index', 1000); - } - /* Toggle Code */ - $('pre.code').before('<a class="codeToggle" href="#">Plain Text View</a>'); - $('a.codeToggle').click().toggle(function() { - $(this).next().show(); - $(this).next().next().hide(); - $(this).text('Code View'); - return false; - }, function() { - $(this).next().hide(); - $(this).next().next().show(); - $(this).text('Plain Text View'); - return false; - }); - -} diff --git a/webroot/js/jquery/jquery.js b/webroot/js/jquery/jquery.js index 0f6d0ce..b88c4df 100644 --- a/webroot/js/jquery/jquery.js +++ b/webroot/js/jquery/jquery.js @@ -22,7 +22,7 @@ var jQuery = window.jQuery = function( selector, context ) { // Map over the $ in case of overwrite if ( window.$ ) var _$ = window.$; - + // Map the jQuery namespace to the '$' one window.$ = jQuery; @@ -99,7 +99,7 @@ jQuery.fn = jQuery.prototype = { // HANDLE: $(*) [ selector ] ); }, - + // The current version of jQuery being used jquery: "1.2.2b2", @@ -107,7 +107,7 @@ jQuery.fn = jQuery.prototype = { size: function() { return this.length; }, - + // The number of elements contained in the matched element set length: 0, @@ -122,7 +122,7 @@ jQuery.fn = jQuery.prototype = { // Return just the object this[ num ]; }, - + // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { @@ -135,7 +135,7 @@ jQuery.fn = jQuery.prototype = { // Return the newly-formed element set return ret; }, - + // Force the current matched set of elements to become // the specified array of elements (destroying the stack in the process) // You should use pushStack() in order to do this, but maintain the stack @@ -144,7 +144,7 @@ jQuery.fn = jQuery.prototype = { // is a super-fast way to populate an object with array-like properties this.length = 0; Array.prototype.push.apply( this, elems ); - + return this; }, @@ -155,7 +155,7 @@ jQuery.fn = jQuery.prototype = { return jQuery.each( this, callback, args ); }, - // Determine the position of an element within + // Determine the position of an element within // the matched set of elements index: function( elem ) { var ret = -1; @@ -171,7 +171,7 @@ jQuery.fn = jQuery.prototype = { attr: function( name, value, type ) { var options = name; - + // Look for the case where we're accessing a style value if ( name.constructor == String ) if ( value == undefined ) @@ -181,7 +181,7 @@ jQuery.fn = jQuery.prototype = { options = {}; options[ name ] = value; } - + // Check to see if we're setting style values return this.each(function(i){ // Set all the styles @@ -264,7 +264,7 @@ jQuery.fn = jQuery.prototype = { this.insertBefore( elem, this.firstChild ); }); }, - + before: function() { return this.domManip(arguments, false, false, function(elem){ this.parentNode.insertBefore( elem, this ); @@ -299,8 +299,8 @@ jQuery.fn = jQuery.prototype = { // using cloneNode. Calling detachEvent on the // clone will also remove the events from the orignal // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored // as properties will not be copied (such as the // the name attribute on an input). var clone = this.cloneNode(true), @@ -320,7 +320,7 @@ jQuery.fn = jQuery.prototype = { if ( this[ expando ] != undefined ) this[ expando ] = null; }); - + // Copy the events from the original to the clone if ( events === true ) this.find("*").andSelf().each(function(i){ @@ -362,9 +362,9 @@ jQuery.fn = jQuery.prototype = { }, add: function( selector ) { - return !selector ? this : this.pushStack( jQuery.merge( + return !selector ? this : this.pushStack( jQuery.merge( this.get(), - selector.constructor == String ? + selector.constructor == String ? jQuery( selector ).get() : selector.length != undefined && (!selector.nodeName || jQuery.nodeName(selector, "form")) ? selector : [selector] ) ); @@ -379,7 +379,7 @@ jQuery.fn = jQuery.prototype = { hasClass: function( selector ) { return this.is( "." + selector ); }, - + val: function( value ) { if ( value == undefined ) { @@ -392,7 +392,7 @@ jQuery.fn = jQuery.prototype = { values = [], options = elem.options, one = elem.type == "select-one"; - + // Nothing was selected if ( index < 0 ) return null; @@ -404,18 +404,18 @@ jQuery.fn = jQuery.prototype = { if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; - + // We don't need an array for one selects if ( one ) return value; - + // Multi-Selects return an array values.push( value ); } } - + return values; - + // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); @@ -450,7 +450,7 @@ jQuery.fn = jQuery.prototype = { this.value = value; }); }, - + html: function( value ) { return value == undefined ? (this.length ? @@ -480,9 +480,9 @@ jQuery.fn = jQuery.prototype = { andSelf: function() { return this.add( this.prevObject ); }, - + domManip: function( args, table, reverse, callback ) { - var clone = this.length > 1, elems; + var clone = this.length > 1, elems; return this.each(function(){ if ( !elems ) { @@ -603,10 +603,10 @@ jQuery.extend({ // This may seem like some crazy code, but trust me when I say that this // is the only cross-browser way to do this. --John isFunction: function( fn ) { - return !!fn && typeof fn != "string" && !fn.nodeName && + return !!fn && typeof fn != "string" && !fn.nodeName && fn.constructor != Array && /function/i.test( fn + "" ); }, - + // check if an element is in a (or is an) XML document isXMLDoc: function( elem ) { return elem.documentElement && !elem.body || @@ -637,9 +637,9 @@ jQuery.extend({ nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); }, - + cache: {}, - + data: function( elem, name, data ) { elem = elem == window ? windowData : @@ -648,24 +648,24 @@ jQuery.extend({ var id = elem[ expando ]; // Compute a unique ID for the element - if ( !id ) + if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name && !jQuery.cache[ id ] ) jQuery.cache[ id ] = {}; - + // Prevent overriding the named cache with undefined values if ( data != undefined ) jQuery.cache[ id ][ name ] = data; - - // Return the named cache data, or the ID for the element + + // Return the named cache data, or the ID for the element return name ? jQuery.cache[ id ][ name ] : id; }, - + removeData: function( elem, name ) { elem = elem == window ? windowData : @@ -723,18 +723,18 @@ jQuery.extend({ for ( var name in object ) callback.call( object[ name ], name, object[ name ] ); else - for ( var i = 0, length = object.length, value = object[0]; + for ( var i = 0, length = object.length, value = object[0]; i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} } return object; }, - + prop: function( elem, value, type, i, name ) { // Handle executable functions if ( jQuery.isFunction( value ) ) value = value.call( elem, i ); - + // Handle passing in a number to a CSS property return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? value + "px" : @@ -755,7 +755,7 @@ jQuery.extend({ if (elem.nodeType == 1) elem.className = classNames != undefined ? jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); + return !jQuery.className.has( classNames, className ); }).join(" ") : ""; }, @@ -785,7 +785,7 @@ jQuery.extend({ css: function( elem, name, force ) { if ( name == "width" || name == "height" ) { var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - + function getWH() { val = name == "width" ? elem.offsetWidth : elem.offsetHeight; var padding = 0, border = 0; @@ -795,15 +795,15 @@ jQuery.extend({ }); val -= Math.round(padding + border); } - + if ( jQuery(elem).is(":visible") ) getWH(); else jQuery.swap( elem, props, getWH ); - + return Math.max(0, val); } - + return jQuery.curCSS( elem, name, force ); }, @@ -833,7 +833,7 @@ jQuery.extend({ elem.style.display = "block"; elem.style.display = save; } - + // Make sure we're using the right name for getting the float value if ( name.match( /float/i ) ) name = styleFloat; @@ -916,12 +916,12 @@ jQuery.extend({ return ret; }, - + clean: function( elems, context ) { var ret = []; context = context || document; // !context.createElement fails in IE with an error but returns typeof 'object' - if (typeof context.createElement == 'undefined') + if (typeof context.createElement == 'undefined') context = context.ownerDocument || context[0] && context[0].ownerDocument || document; jQuery.each(elems, function(i, elem){ @@ -930,7 +930,7 @@ jQuery.extend({ if ( elem.constructor == Number ) elem = elem.toString(); - + // Convert html string into DOM nodes if ( typeof elem == "string" ) { // Fix "XHTML"-style tags in all browsers @@ -947,58 +947,58 @@ jQuery.extend({ // option or optgroup !tags.indexOf("<opt") && [ 1, "<select multiple='multiple'>", "</select>" ] || - + !tags.indexOf("<leg") && [ 1, "<fieldset>", "</fieldset>" ] || - + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && [ 1, "<table>", "</table>" ] || - + !tags.indexOf("<tr") && [ 2, "<table><tbody>", "</tbody></table>" ] || - + // <thead> matched above (!tags.indexOf("<td") || !tags.indexOf("<th")) && [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || - + !tags.indexOf("<col") && [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || // IE can't serialize <link> and <script> tags normally jQuery.browser.msie && [ 1, "div<div>", "</div>" ] || - + [ 0, "", "" ]; // Go to html and back, then peel off extra wrappers div.innerHTML = wrap[1] + elem + wrap[2]; - + // Move to the right depth while ( wrap[0]-- ) div = div.lastChild; - + // Remove IE's autoinserted <tbody> from table fragments if ( jQuery.browser.msie ) { - + // String was a <table>, *may* have spurious <tbody> var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ? div.firstChild && div.firstChild.childNodes : - + // String was a bare <thead> or <tfoot> wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ? div.childNodes : []; - + for ( var j = tbody.length - 1; j >= 0 ; --j ) if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) tbody[ j ].parentNode.removeChild( tbody[ j ] ); - - // IE completely kills leading whitespace when innerHTML is used - if ( /^\s/.test( elem ) ) + + // IE completely kills leading whitespace when innerHTML is used + if ( /^\s/.test( elem ) ) div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild ); - + } - + elem = jQuery.makeArray( div.childNodes ); } @@ -1015,7 +1015,7 @@ jQuery.extend({ return ret; }, - + attr: function( elem, name, value ) { // don't set attributes on text and comment nodes if (!elem || elem.nodeType == 3 || elem.nodeType == 8) @@ -1029,7 +1029,7 @@ jQuery.extend({ // Accessing the parent's selectedIndex property fixes it if ( name == "selected" && jQuery.browser.safari ) elem.parentNode.selectedIndex; - + // Certain attributes only work when accessed via the old DOM 0 way if ( fix[ name ] ) { if ( value != undefined ) @@ -1055,7 +1055,7 @@ jQuery.extend({ elem.setAttribute( name, "" + value ); } - if ( jQuery.browser.msie && /href|src/.test( name ) && !jQuery.isXMLDoc( elem ) ) + if ( jQuery.browser.msie && /href|src/.test( name ) && !jQuery.isXMLDoc( elem ) ) return elem.getAttribute( name, 2 ); return elem.getAttribute( name ); @@ -1067,13 +1067,13 @@ jQuery.extend({ if ( value != undefined ) { // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level - elem.zoom = 1; - + elem.zoom = 1; + // Set the alpha filter to set the opacity elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) + (parseFloat( value ).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); } - + return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : ""; @@ -1089,7 +1089,7 @@ jQuery.extend({ return elem[ name ]; } }, - + trim: function( text ) { return (text || "").replace( /^\s+|\s+$/g, "" ); }, @@ -1205,11 +1205,11 @@ jQuery.browser = { var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat"; - + jQuery.extend({ // Check to see if the W3C box model is being used boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat", - + props: { "for": "htmlFor", "class": "className", @@ -1274,7 +1274,7 @@ jQuery.each({ jQuery.each({ removeAttr: function( name ) { jQuery.attr( this, name, "" ); - if (this.nodeType == 1) + if (this.nodeType == 1) this.removeAttribute( name ); }, @@ -1305,7 +1305,7 @@ jQuery.each({ empty: function() { // Remove element nodes and prevent memory leaks jQuery( ">*", this ).remove(); - + // Remove any remaining nodes while ( this.firstChild ) this.removeChild( this.firstChild ); @@ -1318,25 +1318,25 @@ jQuery.each({ jQuery.each([ "Height", "Width" ], function(i, name){ var type = name.toLowerCase(); - + jQuery.fn[ type ] = function( size ) { // Get window width or height return this[0] == window ? // Opera reports document.body.client[Width/Height] properly in both quirks and standards - jQuery.browser.opera && document.body[ "client" + name ] || - + jQuery.browser.opera && document.body[ "client" + name ] || + // Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths) jQuery.browser.safari && window[ "inner" + name ] || - + // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] : - + // Get document width or height this[0] == document ? // Either scroll[Width/Height] or offset[Width/Height], whichever is greater - Math.max( - Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]), - Math.max(document.body["offset" + name], document.documentElement["offset" + name]) + Math.max( + Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]), + Math.max(document.body["offset" + name], document.documentElement["offset" + name]) ) : // Get or set width or height on the element @@ -1415,7 +1415,7 @@ jQuery.extend({ animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length" } }, - + // The regular expressions that power the parsing engine parse: [ // Match: [@value='test'], [@foo] @@ -1501,12 +1501,12 @@ jQuery.extend({ var id = jQuery.data(n); if ( m == "~" && merge[id] ) break; - + if (!nodeName || n.nodeName.toUpperCase() == nodeName ) { if ( m == "~" ) merge[id] = true; r.push( n ); } - + if ( m == "+" ) break; } } @@ -1540,7 +1540,7 @@ jQuery.extend({ // Optimize for the case nodeName#idName var re2 = quickID; var m = re2.exec(t); - + // Re-organize the results, so that they're consistent if ( m ) { m = [ 0, m[2], m[3], m[1] ]; @@ -1560,7 +1560,7 @@ jQuery.extend({ if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) { // Optimization for HTML document case var oid = elem.getElementById(m[2]); - + // Do a quick check for the existence of the actual ID attribute // to avoid selecting by the name attribute in IE // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form @@ -1682,10 +1682,10 @@ jQuery.extend({ else if ( m[1] == "[" ) { var tmp = [], type = m[3]; - + for ( var i = 0, rl = r.length; i < rl; i++ ) { var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ]; - + if ( z == null || /href|src|selected/.test(m[2]) ) z = jQuery.attr(a,m[2]) || ''; @@ -1697,7 +1697,7 @@ jQuery.extend({ (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not ) tmp.push( a ); } - + r = tmp; // We can get a speed boost by handling nth-child here @@ -1709,7 +1709,7 @@ jQuery.extend({ !/\D/.test(m[3]) && "0n+" + m[3] || m[3]), // calculate the numbers (first)n+(last) including if they are negative first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0; - + // loop through all the elements left in the jQuery object for ( var i = 0, rl = r.length; i < rl; i++ ) { var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode); @@ -1767,7 +1767,7 @@ jQuery.extend({ } return matched; }, - + nth: function(cur,result,dir,elem){ result = result || 1; var num = 0; @@ -1778,7 +1778,7 @@ jQuery.extend({ return cur; }, - + sibling: function( n, elem ) { var r = []; @@ -1793,7 +1793,7 @@ jQuery.extend({ /* * A number of helper functions used for managing events. - * Many of the ideas behind this code orignated from + * Many of the ideas behind this code orignated from * Dean Edwards' addEvent library. */ jQuery.event = { @@ -1812,22 +1812,22 @@ jQuery.event = { // Make sure that the function being executed has a unique ID if ( !handler.guid ) handler.guid = this.guid++; - - // if data is passed, bind to handler - if( data != undefined ) { - // Create temporary function pointer to original handler - var fn = handler; - - // Create unique handler function, wrapped around original handler - handler = function() { - // Pass arguments and context to original handler - return fn.apply(this, arguments); + + // if data is passed, bind to handler + if( data != undefined ) { + // Create temporary function pointer to original handler + var fn = handler; + + // Create unique handler function, wrapped around original handler + handler = function() { + // Pass arguments and context to original handler + return fn.apply(this, arguments); }; - // Store data in unique handler + // Store data in unique handler handler.data = data; - // Set the guid of unique handler to the same of original handler, so it can be removed + // Set the guid of unique handler to the same of original handler, so it can be removed handler.guid = fn.guid; } @@ -1841,16 +1841,16 @@ jQuery.event = { // an event is called after a page has unloaded if ( typeof jQuery == "undefined" || jQuery.event.triggered ) return val; - + val = jQuery.event.handle.apply(arguments.callee.elem, arguments); - + return val; }); // Add elem as a property of the handle function // This is to prevent a memory leak with non-native // event in IE. handle.elem = elem; - + // Handle multiple events seperated by a space // jQuery(...).bind("mouseover mouseout", fn); jQuery.each(types.split(/\s+/), function(index, type) { @@ -1865,7 +1865,7 @@ jQuery.event = { // Init the event handler queue if (!handlers) { handlers = events[type] = {}; - + // Check for a special event handler // Only use addEventListener/attachEvent if the special // events handler returns false @@ -1884,7 +1884,7 @@ jQuery.event = { // Keep track of which events have been used, for global triggering jQuery.event.global[type] = true; }); - + // Nullify elem to prevent memory leaks in IE elem = null; }, @@ -1911,19 +1911,19 @@ jQuery.event = { handler = types.handler; types = types.type; } - + // Handle multiple events seperated by a space // jQuery(...).unbind("mouseover mouseout", fn); jQuery.each(types.split(/\s+/), function(index, type){ // Namespaced event handlers var parts = type.split("."); type = parts[0]; - + if ( events[type] ) { // remove the given handler for the given type if ( handler ) delete events[type][handler.guid]; - + // remove all handlers for the given type else for ( handler in events[type] ) @@ -1977,7 +1977,7 @@ jQuery.event = { var val, ret, fn = jQuery.isFunction( elem[ type ] || null ), // Check to see if we need to provide a fake event, or not event = !data[0] || !data[0].preventDefault; - + // Pass along a fake event if ( event ) data.unshift( this.fix({ type: type, target: elem }) ); @@ -2026,7 +2026,7 @@ jQuery.event = { var val; // Empty object is for triggered events with no data - event = jQuery.event.fix( event || window.event || {} ); + event = jQuery.event.fix( event || window.event || {} ); // Namespaced event handlers var parts = event.type.split("."); @@ -2065,12 +2065,12 @@ jQuery.event = { }, fix: function(event) { - // store a copy of the original event object + // store a copy of the original event object // and clone to set read-only properties var originalEvent = event; event = jQuery.extend({}, originalEvent); - - // add preventDefault and stopPropagation since + + // add preventDefault and stopPropagation since // they will not work on the clone event.preventDefault = function() { // if preventDefault exists run it on the original event @@ -2086,11 +2086,11 @@ jQuery.event = { // otherwise set the cancelBubble property of the original event to true (IE) originalEvent.cancelBubble = true; }; - + // Fix target property, if necessary if ( !event.target ) event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either - + // check if target is a textnode (safari) if ( event.target.nodeType == 3 ) event.target = originalEvent.target.parentNode; @@ -2105,11 +2105,11 @@ jQuery.event = { event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); } - + // Add which for key events if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) event.which = event.charCode || event.keyCode; - + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if ( !event.metaKey && event.ctrlKey ) event.metaKey = event.ctrlKey; @@ -2118,10 +2118,10 @@ jQuery.event = { // Note: button is not normalized, so don't use it if ( !event.which && event.button ) event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); - + return event; }, - + special: { ready: { setup: function() { @@ -2129,23 +2129,23 @@ jQuery.event = { bindReady(); return; }, - + teardown: function() { return; } }, - + mouseenter: { setup: function() { if ( jQuery.browser.msie ) return false; jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler); return true; }, - + teardown: function() { if ( jQuery.browser.msie ) return false; jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler); return true; }, - + handler: function(event) { // If we actually just moused on to a sub-element, ignore it if ( withinElement(event, this) ) return true; @@ -2154,20 +2154,20 @@ jQuery.event = { return jQuery.event.handle.apply(this, arguments); } }, - + mouseleave: { setup: function() { if ( jQuery.browser.msie ) return false; jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler); return true; }, - + teardown: function() { if ( jQuery.browser.msie ) return false; jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler); return true; }, - + handler: function(event) { // If we actually just moused on to a sub-element, ignore it if ( withinElement(event, this) ) return true; @@ -2185,7 +2185,7 @@ jQuery.fn.extend({ jQuery.event.add( this, type, fn || data, fn && data ); }); }, - + one: function( type, data, fn ) { return this.each(function(){ jQuery.event.add( this, type, function(event) { @@ -2220,10 +2220,10 @@ jQuery.fn.extend({ return this.click(function(event) { // Figure out which function to execute this.lastToggle = 0 == this.lastToggle ? 1 : 0; - + // Make sure that clicks stop event.preventDefault(); - + // and execute the function return args[this.lastToggle].apply( this, arguments ) || false; }); @@ -2232,7 +2232,7 @@ jQuery.fn.extend({ hover: function(fnOver, fnOut) { return this.bind('mouseenter', fnOver).bind('mouseleave', fnOut); }, - + ready: function(fn) { // Attach the listeners bindReady(); @@ -2241,12 +2241,12 @@ jQuery.fn.extend({ if ( jQuery.isReady ) // Execute the function immediately fn.call( document, jQuery ); - + // Otherwise, remember the function for later else // Add the function to the wait list jQuery.readyList.push( function() { return fn.call(this, jQuery); } ); - + return this; } }); @@ -2260,18 +2260,18 @@ jQuery.extend({ if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; - + // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them jQuery.each( jQuery.readyList, function(){ this.apply( document ); }); - + // Reset the list of functions jQuery.readyList = null; } - + // Trigger any bound ready events jQuery(document).triggerHandler("ready"); } @@ -2288,7 +2288,7 @@ function bindReady(){ if ( document.addEventListener && !jQuery.browser.opera) // Use the handy event callback document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); - + // If IE is used and is not in a frame // Continually check to see if the document is ready if ( jQuery.browser.msie && window == top ) (function(){ @@ -2341,9 +2341,9 @@ function bindReady(){ } jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + - "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + + "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + "submit,keydown,keypress,keyup,error").split(","), function(i, name){ - + // Handle event binding jQuery.fn[name] = function(fn){ return fn ? this.bind(name, fn) : this.trigger(name); @@ -2437,8 +2437,8 @@ jQuery.fn.extend({ jQuery.makeArray(this.elements) : this; }) .filter(function(){ - return this.name && !this.disabled && - (this.checked || /select|textarea/i.test(this.nodeName) || + return this.name && !this.disabled && + (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password/i.test(this.type)); }) .map(function(i, elem){ @@ -2469,7 +2469,7 @@ jQuery.extend({ callback = data; data = null; } - + return jQuery.ajax({ type: "GET", url: url, @@ -2517,7 +2517,7 @@ jQuery.extend({ username: null, password: null }, - + // Last-Modified header cache for next request lastModified: {}, @@ -2606,7 +2606,7 @@ jQuery.extend({ // Attach handlers for all browsers script.onload = script.onreadystatechange = function(){ - if ( !done && (!this.readyState || + if ( !done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") ) { done = true; success(); @@ -2649,7 +2649,7 @@ jQuery.extend({ // Allow custom headers/mimetypes if ( s.beforeSend ) s.beforeSend(xml); - + if ( s.global ) jQuery.event.trigger("ajaxSend", [xml, s]); @@ -2658,13 +2658,13 @@ jQuery.extend({ // The transfer is complete and the data is available, or the request timed out if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) { requestDone = true; - + // clear poll interval if (ival) { clearInterval(ival); ival = null; } - + status = isTimeout == "timeout" && "timeout" || !jQuery.httpSuccess( xml ) && "error" || s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" || @@ -2687,13 +2687,13 @@ jQuery.extend({ try { modRes = xml.getResponseHeader("Last-Modified"); } catch(e) {} // swallow exception thrown by FF if header is not available - + if ( s.ifModified && modRes ) jQuery.lastModified[s.url] = modRes; // JSONP handles its own success callback if ( !jsonp ) - success(); + success(); } else jQuery.handleError(s, xml, status); @@ -2705,10 +2705,10 @@ jQuery.extend({ xml = null; } }; - + if ( s.async ) { // don't attach the handler to the request, just poll it instead - var ival = setInterval(onreadystatechange, 13); + var ival = setInterval(onreadystatechange, 13); // Timeout checker if ( s.timeout > 0 ) @@ -2717,20 +2717,20 @@ jQuery.extend({ if ( xml ) { // Cancel the request xml.abort(); - + if( !requestDone ) onreadystatechange( "timeout" ); } }, s.timeout); } - + // Send the data try { xml.send(s.data); } catch(e) { jQuery.handleError(s, xml, null, e); } - + // firefox 1.5 doesn't fire statechange for sync requests if ( !s.async ) onreadystatechange(); @@ -2758,7 +2758,7 @@ jQuery.extend({ if ( s.global && ! --jQuery.active ) jQuery.event.trigger( "ajaxStop" ); } - + // return XMLHttpRequest to allow aborting the request etc. return xml; }, @@ -2853,7 +2853,7 @@ jQuery.fn.extend({ this.animate({ height: "show", width: "show", opacity: "show" }, speed, callback) : - + this.filter(":hidden").each(function(){ this.style.display = this.oldblock || ""; if ( jQuery.css(this,"display") == "none" ) { @@ -2863,13 +2863,13 @@ jQuery.fn.extend({ } }).end(); }, - + hide: function(speed,callback){ return speed ? this.animate({ height: "hide", width: "hide", opacity: "hide" }, speed, callback) : - + this.filter(":visible").each(function(){ this.oldblock = this.oldblock || jQuery.css(this,"display"); this.style.display = "none"; @@ -2878,7 +2878,7 @@ jQuery.fn.extend({ // Save the old toggle function _toggle: jQuery.fn.toggle, - + toggle: function( fn, fn2 ){ return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? this._toggle( fn, fn2 ) : @@ -2890,11 +2890,11 @@ jQuery.fn.extend({ jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); }); }, - + slideDown: function(speed,callback){ return this.animate({height: "show"}, speed, callback); }, - + slideUp: function(speed,callback){ return this.animate({height: "hide"}, speed, callback); }, @@ -2902,19 +2902,19 @@ jQuery.fn.extend({ slideToggle: function(speed, callback){ return this.animate({height: "toggle"}, speed, callback); }, - + fadeIn: function(speed, callback){ return this.animate({opacity: "show"}, speed, callback); }, - + fadeOut: function(speed, callback){ return this.animate({opacity: "hide"}, speed, callback); }, - + fadeTo: function(speed,to,callback){ return this.animate({opacity: to}, speed, callback); }, - + animate: function( prop, speed, easing, callback ) { var optall = jQuery.speed(speed, easing, callback); @@ -2924,7 +2924,7 @@ jQuery.fn.extend({ var opt = jQuery.extend({}, optall); var hidden = jQuery(this).is(":hidden"), self = this; - + for ( var p in prop ) { if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) return jQuery.isFunction(opt.complete) && opt.complete.apply(this); @@ -2942,7 +2942,7 @@ jQuery.fn.extend({ this.style.overflow = "hidden"; opt.curAnim = jQuery.extend({}, prop); - + jQuery.each( prop, function(name, val){ var e = new jQuery.fx( self, opt, name ); @@ -2977,7 +2977,7 @@ jQuery.fn.extend({ return true; }); }, - + queue: function(type, fn){ if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) { fn = type; @@ -2992,7 +2992,7 @@ jQuery.fn.extend({ queue(this, type, fn); else { queue(this, type).push( fn ); - + if ( queue(this, type).length == 1 ) fn.apply(this); } @@ -3034,7 +3034,7 @@ var queue = function( elem, type, array ) { var q = jQuery.data( elem, type + "queue" ); if ( !q || array ) - q = jQuery.data( elem, type + "queue", + q = jQuery.data( elem, type + "queue", array ? jQuery.makeArray(array) : [] ); return q; @@ -3054,19 +3054,19 @@ jQuery.fn.dequeue = function(type){ }; jQuery.extend({ - + speed: function(speed, easing, fn) { var opt = speed && speed.constructor == Object ? speed : { - complete: fn || !fn && easing || + complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && easing.constructor != Function && easing }; - opt.duration = (opt.duration && opt.duration.constructor == Number ? - opt.duration : + opt.duration = (opt.duration && opt.duration.constructor == Number ? + opt.duration : { slow: 600, fast: 200 }[opt.duration]) || 400; - + // Queueing opt.old = opt.complete; opt.complete = function(){ @@ -3075,10 +3075,10 @@ jQuery.extend({ if ( jQuery.isFunction( opt.old ) ) opt.old.apply( this ); }; - + return opt; }, - + easing: { linear: function( p, n, firstNum, diff ) { return firstNum + diff * p; @@ -3087,7 +3087,7 @@ jQuery.extend({ return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; } }, - + timers: [], timerId: null, @@ -3147,7 +3147,7 @@ jQuery.fx.prototype = { if ( jQuery.timerId == null ) { jQuery.timerId = setInterval(function(){ var timers = jQuery.timers; - + for ( var i = 0; i < timers.length; i++ ) if ( !timers[i]() ) timers.splice(i--, 1); @@ -3173,7 +3173,7 @@ jQuery.fx.prototype = { // flash of content if ( this.prop == "width" || this.prop == "height" ) this.elem.style[this.prop] = "1px"; - + // Start by showing the element jQuery(this.elem).show(); }, @@ -3208,7 +3208,7 @@ jQuery.fx.prototype = { if ( this.options.display != null ) { // Reset the overflow this.elem.style.overflow = this.options.overflow; - + // Reset the display this.elem.style.display = this.options.display; if ( jQuery.css(this.elem, "display") == "none" ) @@ -3270,23 +3270,23 @@ jQuery.fx.step = { // http://jquery.com/plugins/project/dimensions jQuery.fn.offset = function() { var left = 0, top = 0, elem = this[0], results; - + if ( elem ) with ( jQuery.browser ) { - var parent = elem.parentNode, + var parent = elem.parentNode, offsetChild = elem, - offsetParent = elem.offsetParent, + offsetParent = elem.offsetParent, doc = elem.ownerDocument, safari2 = safari && parseInt(version) < 522, fixed = jQuery.css(elem, "position") == "fixed"; - + // Use getBoundingClientRect if available if ( elem.getBoundingClientRect ) { var box = elem.getBoundingClientRect(); - + // Add the document scroll offsets add(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop)); - + // IE adds the HTML element's border, by default it is medium which is 2px // IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; } // IE 7 standards mode, the border is always 2px @@ -3294,54 +3294,54 @@ jQuery.fn.offset = function() { // However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS // Therefore this method will be off by 2px in IE while in quirksmode add( -doc.documentElement.clientLeft, -doc.documentElement.clientTop ); - + // Otherwise loop through the offsetParents and parentNodes } else { - + // Initial element offsets add( elem.offsetLeft, elem.offsetTop ); - + // Get parent offsets while ( offsetParent ) { // Add offsetParent offsets add( offsetParent.offsetLeft, offsetParent.offsetTop ); - + // Mozilla and Safari > 2 does not include the border on offset parents // However Mozilla adds the border for table or table cells if ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 ) border( offsetParent ); - + // Add the document scroll offsets if position is fixed on any offsetParent if ( !fixed && jQuery.css(offsetParent, "position") == "fixed" ) fixed = true; - + // Set offsetChild to previous offsetParent unless it is the body element offsetChild = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent; // Get next offsetParent offsetParent = offsetParent.offsetParent; } - + // Get parent scroll offsets while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) { // Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug if ( !/^inline|table.*$/i.test(jQuery.css(parent, "display")) ) // Subtract parent scroll offsets add( -parent.scrollLeft, -parent.scrollTop ); - + // Mozilla does not add the border for a parent that has overflow != visible if ( mozilla && jQuery.css(parent, "overflow") != "visible" ) border( parent ); - + // Get next parent parent = parent.parentNode; } - + // Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild // Mozilla doubles body offsets with a non-absolutely positioned offsetChild - if ( (safari2 && (fixed || jQuery.css(offsetChild, "position") == "absolute")) || + if ( (safari2 && (fixed || jQuery.css(offsetChild, "position") == "absolute")) || (mozilla && jQuery.css(offsetChild, "position") != "absolute") ) add( -doc.body.offsetLeft, -doc.body.offsetTop ); - + // Add the document scroll offsets if position is fixed if ( fixed ) add(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), @@ -3363,4 +3363,4 @@ jQuery.fn.offset = function() { return results; }; -})(); +})(); \ No newline at end of file diff --git a/webroot/js/jquery/jquery.lite.js b/webroot/js/jquery/jquery.lite.js index 0f6d0ce..b88c4df 100644 --- a/webroot/js/jquery/jquery.lite.js +++ b/webroot/js/jquery/jquery.lite.js @@ -22,7 +22,7 @@ var jQuery = window.jQuery = function( selector, context ) { // Map over the $ in case of overwrite if ( window.$ ) var _$ = window.$; - + // Map the jQuery namespace to the '$' one window.$ = jQuery; @@ -99,7 +99,7 @@ jQuery.fn = jQuery.prototype = { // HANDLE: $(*) [ selector ] ); }, - + // The current version of jQuery being used jquery: "1.2.2b2", @@ -107,7 +107,7 @@ jQuery.fn = jQuery.prototype = { size: function() { return this.length; }, - + // The number of elements contained in the matched element set length: 0, @@ -122,7 +122,7 @@ jQuery.fn = jQuery.prototype = { // Return just the object this[ num ]; }, - + // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { @@ -135,7 +135,7 @@ jQuery.fn = jQuery.prototype = { // Return the newly-formed element set return ret; }, - + // Force the current matched set of elements to become // the specified array of elements (destroying the stack in the process) // You should use pushStack() in order to do this, but maintain the stack @@ -144,7 +144,7 @@ jQuery.fn = jQuery.prototype = { // is a super-fast way to populate an object with array-like properties this.length = 0; Array.prototype.push.apply( this, elems ); - + return this; }, @@ -155,7 +155,7 @@ jQuery.fn = jQuery.prototype = { return jQuery.each( this, callback, args ); }, - // Determine the position of an element within + // Determine the position of an element within // the matched set of elements index: function( elem ) { var ret = -1; @@ -171,7 +171,7 @@ jQuery.fn = jQuery.prototype = { attr: function( name, value, type ) { var options = name; - + // Look for the case where we're accessing a style value if ( name.constructor == String ) if ( value == undefined ) @@ -181,7 +181,7 @@ jQuery.fn = jQuery.prototype = { options = {}; options[ name ] = value; } - + // Check to see if we're setting style values return this.each(function(i){ // Set all the styles @@ -264,7 +264,7 @@ jQuery.fn = jQuery.prototype = { this.insertBefore( elem, this.firstChild ); }); }, - + before: function() { return this.domManip(arguments, false, false, function(elem){ this.parentNode.insertBefore( elem, this ); @@ -299,8 +299,8 @@ jQuery.fn = jQuery.prototype = { // using cloneNode. Calling detachEvent on the // clone will also remove the events from the orignal // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored // as properties will not be copied (such as the // the name attribute on an input). var clone = this.cloneNode(true), @@ -320,7 +320,7 @@ jQuery.fn = jQuery.prototype = { if ( this[ expando ] != undefined ) this[ expando ] = null; }); - + // Copy the events from the original to the clone if ( events === true ) this.find("*").andSelf().each(function(i){ @@ -362,9 +362,9 @@ jQuery.fn = jQuery.prototype = { }, add: function( selector ) { - return !selector ? this : this.pushStack( jQuery.merge( + return !selector ? this : this.pushStack( jQuery.merge( this.get(), - selector.constructor == String ? + selector.constructor == String ? jQuery( selector ).get() : selector.length != undefined && (!selector.nodeName || jQuery.nodeName(selector, "form")) ? selector : [selector] ) ); @@ -379,7 +379,7 @@ jQuery.fn = jQuery.prototype = { hasClass: function( selector ) { return this.is( "." + selector ); }, - + val: function( value ) { if ( value == undefined ) { @@ -392,7 +392,7 @@ jQuery.fn = jQuery.prototype = { values = [], options = elem.options, one = elem.type == "select-one"; - + // Nothing was selected if ( index < 0 ) return null; @@ -404,18 +404,18 @@ jQuery.fn = jQuery.prototype = { if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; - + // We don't need an array for one selects if ( one ) return value; - + // Multi-Selects return an array values.push( value ); } } - + return values; - + // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); @@ -450,7 +450,7 @@ jQuery.fn = jQuery.prototype = { this.value = value; }); }, - + html: function( value ) { return value == undefined ? (this.length ? @@ -480,9 +480,9 @@ jQuery.fn = jQuery.prototype = { andSelf: function() { return this.add( this.prevObject ); }, - + domManip: function( args, table, reverse, callback ) { - var clone = this.length > 1, elems; + var clone = this.length > 1, elems; return this.each(function(){ if ( !elems ) { @@ -603,10 +603,10 @@ jQuery.extend({ // This may seem like some crazy code, but trust me when I say that this // is the only cross-browser way to do this. --John isFunction: function( fn ) { - return !!fn && typeof fn != "string" && !fn.nodeName && + return !!fn && typeof fn != "string" && !fn.nodeName && fn.constructor != Array && /function/i.test( fn + "" ); }, - + // check if an element is in a (or is an) XML document isXMLDoc: function( elem ) { return elem.documentElement && !elem.body || @@ -637,9 +637,9 @@ jQuery.extend({ nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); }, - + cache: {}, - + data: function( elem, name, data ) { elem = elem == window ? windowData : @@ -648,24 +648,24 @@ jQuery.extend({ var id = elem[ expando ]; // Compute a unique ID for the element - if ( !id ) + if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name && !jQuery.cache[ id ] ) jQuery.cache[ id ] = {}; - + // Prevent overriding the named cache with undefined values if ( data != undefined ) jQuery.cache[ id ][ name ] = data; - - // Return the named cache data, or the ID for the element + + // Return the named cache data, or the ID for the element return name ? jQuery.cache[ id ][ name ] : id; }, - + removeData: function( elem, name ) { elem = elem == window ? windowData : @@ -723,18 +723,18 @@ jQuery.extend({ for ( var name in object ) callback.call( object[ name ], name, object[ name ] ); else - for ( var i = 0, length = object.length, value = object[0]; + for ( var i = 0, length = object.length, value = object[0]; i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} } return object; }, - + prop: function( elem, value, type, i, name ) { // Handle executable functions if ( jQuery.isFunction( value ) ) value = value.call( elem, i ); - + // Handle passing in a number to a CSS property return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? value + "px" : @@ -755,7 +755,7 @@ jQuery.extend({ if (elem.nodeType == 1) elem.className = classNames != undefined ? jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); + return !jQuery.className.has( classNames, className ); }).join(" ") : ""; }, @@ -785,7 +785,7 @@ jQuery.extend({ css: function( elem, name, force ) { if ( name == "width" || name == "height" ) { var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - + function getWH() { val = name == "width" ? elem.offsetWidth : elem.offsetHeight; var padding = 0, border = 0; @@ -795,15 +795,15 @@ jQuery.extend({ }); val -= Math.round(padding + border); } - + if ( jQuery(elem).is(":visible") ) getWH(); else jQuery.swap( elem, props, getWH ); - + return Math.max(0, val); } - + return jQuery.curCSS( elem, name, force ); }, @@ -833,7 +833,7 @@ jQuery.extend({ elem.style.display = "block"; elem.style.display = save; } - + // Make sure we're using the right name for getting the float value if ( name.match( /float/i ) ) name = styleFloat; @@ -916,12 +916,12 @@ jQuery.extend({ return ret; }, - + clean: function( elems, context ) { var ret = []; context = context || document; // !context.createElement fails in IE with an error but returns typeof 'object' - if (typeof context.createElement == 'undefined') + if (typeof context.createElement == 'undefined') context = context.ownerDocument || context[0] && context[0].ownerDocument || document; jQuery.each(elems, function(i, elem){ @@ -930,7 +930,7 @@ jQuery.extend({ if ( elem.constructor == Number ) elem = elem.toString(); - + // Convert html string into DOM nodes if ( typeof elem == "string" ) { // Fix "XHTML"-style tags in all browsers @@ -947,58 +947,58 @@ jQuery.extend({ // option or optgroup !tags.indexOf("<opt") && [ 1, "<select multiple='multiple'>", "</select>" ] || - + !tags.indexOf("<leg") && [ 1, "<fieldset>", "</fieldset>" ] || - + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && [ 1, "<table>", "</table>" ] || - + !tags.indexOf("<tr") && [ 2, "<table><tbody>", "</tbody></table>" ] || - + // <thead> matched above (!tags.indexOf("<td") || !tags.indexOf("<th")) && [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || - + !tags.indexOf("<col") && [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || // IE can't serialize <link> and <script> tags normally jQuery.browser.msie && [ 1, "div<div>", "</div>" ] || - + [ 0, "", "" ]; // Go to html and back, then peel off extra wrappers div.innerHTML = wrap[1] + elem + wrap[2]; - + // Move to the right depth while ( wrap[0]-- ) div = div.lastChild; - + // Remove IE's autoinserted <tbody> from table fragments if ( jQuery.browser.msie ) { - + // String was a <table>, *may* have spurious <tbody> var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ? div.firstChild && div.firstChild.childNodes : - + // String was a bare <thead> or <tfoot> wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ? div.childNodes : []; - + for ( var j = tbody.length - 1; j >= 0 ; --j ) if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) tbody[ j ].parentNode.removeChild( tbody[ j ] ); - - // IE completely kills leading whitespace when innerHTML is used - if ( /^\s/.test( elem ) ) + + // IE completely kills leading whitespace when innerHTML is used + if ( /^\s/.test( elem ) ) div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild ); - + } - + elem = jQuery.makeArray( div.childNodes ); } @@ -1015,7 +1015,7 @@ jQuery.extend({ return ret; }, - + attr: function( elem, name, value ) { // don't set attributes on text and comment nodes if (!elem || elem.nodeType == 3 || elem.nodeType == 8) @@ -1029,7 +1029,7 @@ jQuery.extend({ // Accessing the parent's selectedIndex property fixes it if ( name == "selected" && jQuery.browser.safari ) elem.parentNode.selectedIndex; - + // Certain attributes only work when accessed via the old DOM 0 way if ( fix[ name ] ) { if ( value != undefined ) @@ -1055,7 +1055,7 @@ jQuery.extend({ elem.setAttribute( name, "" + value ); } - if ( jQuery.browser.msie && /href|src/.test( name ) && !jQuery.isXMLDoc( elem ) ) + if ( jQuery.browser.msie && /href|src/.test( name ) && !jQuery.isXMLDoc( elem ) ) return elem.getAttribute( name, 2 ); return elem.getAttribute( name ); @@ -1067,13 +1067,13 @@ jQuery.extend({ if ( value != undefined ) { // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level - elem.zoom = 1; - + elem.zoom = 1; + // Set the alpha filter to set the opacity elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) + (parseFloat( value ).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); } - + return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : ""; @@ -1089,7 +1089,7 @@ jQuery.extend({ return elem[ name ]; } }, - + trim: function( text ) { return (text || "").replace( /^\s+|\s+$/g, "" ); }, @@ -1205,11 +1205,11 @@ jQuery.browser = { var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat"; - + jQuery.extend({ // Check to see if the W3C box model is being used boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat", - + props: { "for": "htmlFor", "class": "className", @@ -1274,7 +1274,7 @@ jQuery.each({ jQuery.each({ removeAttr: function( name ) { jQuery.attr( this, name, "" ); - if (this.nodeType == 1) + if (this.nodeType == 1) this.removeAttribute( name ); }, @@ -1305,7 +1305,7 @@ jQuery.each({ empty: function() { // Remove element nodes and prevent memory leaks jQuery( ">*", this ).remove(); - + // Remove any remaining nodes while ( this.firstChild ) this.removeChild( this.firstChild ); @@ -1318,25 +1318,25 @@ jQuery.each({ jQuery.each([ "Height", "Width" ], function(i, name){ var type = name.toLowerCase(); - + jQuery.fn[ type ] = function( size ) { // Get window width or height return this[0] == window ? // Opera reports document.body.client[Width/Height] properly in both quirks and standards - jQuery.browser.opera && document.body[ "client" + name ] || - + jQuery.browser.opera && document.body[ "client" + name ] || + // Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths) jQuery.browser.safari && window[ "inner" + name ] || - + // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] : - + // Get document width or height this[0] == document ? // Either scroll[Width/Height] or offset[Width/Height], whichever is greater - Math.max( - Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]), - Math.max(document.body["offset" + name], document.documentElement["offset" + name]) + Math.max( + Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]), + Math.max(document.body["offset" + name], document.documentElement["offset" + name]) ) : // Get or set width or height on the element @@ -1415,7 +1415,7 @@ jQuery.extend({ animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length" } }, - + // The regular expressions that power the parsing engine parse: [ // Match: [@value='test'], [@foo] @@ -1501,12 +1501,12 @@ jQuery.extend({ var id = jQuery.data(n); if ( m == "~" && merge[id] ) break; - + if (!nodeName || n.nodeName.toUpperCase() == nodeName ) { if ( m == "~" ) merge[id] = true; r.push( n ); } - + if ( m == "+" ) break; } } @@ -1540,7 +1540,7 @@ jQuery.extend({ // Optimize for the case nodeName#idName var re2 = quickID; var m = re2.exec(t); - + // Re-organize the results, so that they're consistent if ( m ) { m = [ 0, m[2], m[3], m[1] ]; @@ -1560,7 +1560,7 @@ jQuery.extend({ if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) { // Optimization for HTML document case var oid = elem.getElementById(m[2]); - + // Do a quick check for the existence of the actual ID attribute // to avoid selecting by the name attribute in IE // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form @@ -1682,10 +1682,10 @@ jQuery.extend({ else if ( m[1] == "[" ) { var tmp = [], type = m[3]; - + for ( var i = 0, rl = r.length; i < rl; i++ ) { var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ]; - + if ( z == null || /href|src|selected/.test(m[2]) ) z = jQuery.attr(a,m[2]) || ''; @@ -1697,7 +1697,7 @@ jQuery.extend({ (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not ) tmp.push( a ); } - + r = tmp; // We can get a speed boost by handling nth-child here @@ -1709,7 +1709,7 @@ jQuery.extend({ !/\D/.test(m[3]) && "0n+" + m[3] || m[3]), // calculate the numbers (first)n+(last) including if they are negative first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0; - + // loop through all the elements left in the jQuery object for ( var i = 0, rl = r.length; i < rl; i++ ) { var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode); @@ -1767,7 +1767,7 @@ jQuery.extend({ } return matched; }, - + nth: function(cur,result,dir,elem){ result = result || 1; var num = 0; @@ -1778,7 +1778,7 @@ jQuery.extend({ return cur; }, - + sibling: function( n, elem ) { var r = []; @@ -1793,7 +1793,7 @@ jQuery.extend({ /* * A number of helper functions used for managing events. - * Many of the ideas behind this code orignated from + * Many of the ideas behind this code orignated from * Dean Edwards' addEvent library. */ jQuery.event = { @@ -1812,22 +1812,22 @@ jQuery.event = { // Make sure that the function being executed has a unique ID if ( !handler.guid ) handler.guid = this.guid++; - - // if data is passed, bind to handler - if( data != undefined ) { - // Create temporary function pointer to original handler - var fn = handler; - - // Create unique handler function, wrapped around original handler - handler = function() { - // Pass arguments and context to original handler - return fn.apply(this, arguments); + + // if data is passed, bind to handler + if( data != undefined ) { + // Create temporary function pointer to original handler + var fn = handler; + + // Create unique handler function, wrapped around original handler + handler = function() { + // Pass arguments and context to original handler + return fn.apply(this, arguments); }; - // Store data in unique handler + // Store data in unique handler handler.data = data; - // Set the guid of unique handler to the same of original handler, so it can be removed + // Set the guid of unique handler to the same of original handler, so it can be removed handler.guid = fn.guid; } @@ -1841,16 +1841,16 @@ jQuery.event = { // an event is called after a page has unloaded if ( typeof jQuery == "undefined" || jQuery.event.triggered ) return val; - + val = jQuery.event.handle.apply(arguments.callee.elem, arguments); - + return val; }); // Add elem as a property of the handle function // This is to prevent a memory leak with non-native // event in IE. handle.elem = elem; - + // Handle multiple events seperated by a space // jQuery(...).bind("mouseover mouseout", fn); jQuery.each(types.split(/\s+/), function(index, type) { @@ -1865,7 +1865,7 @@ jQuery.event = { // Init the event handler queue if (!handlers) { handlers = events[type] = {}; - + // Check for a special event handler // Only use addEventListener/attachEvent if the special // events handler returns false @@ -1884,7 +1884,7 @@ jQuery.event = { // Keep track of which events have been used, for global triggering jQuery.event.global[type] = true; }); - + // Nullify elem to prevent memory leaks in IE elem = null; }, @@ -1911,19 +1911,19 @@ jQuery.event = { handler = types.handler; types = types.type; } - + // Handle multiple events seperated by a space // jQuery(...).unbind("mouseover mouseout", fn); jQuery.each(types.split(/\s+/), function(index, type){ // Namespaced event handlers var parts = type.split("."); type = parts[0]; - + if ( events[type] ) { // remove the given handler for the given type if ( handler ) delete events[type][handler.guid]; - + // remove all handlers for the given type else for ( handler in events[type] ) @@ -1977,7 +1977,7 @@ jQuery.event = { var val, ret, fn = jQuery.isFunction( elem[ type ] || null ), // Check to see if we need to provide a fake event, or not event = !data[0] || !data[0].preventDefault; - + // Pass along a fake event if ( event ) data.unshift( this.fix({ type: type, target: elem }) ); @@ -2026,7 +2026,7 @@ jQuery.event = { var val; // Empty object is for triggered events with no data - event = jQuery.event.fix( event || window.event || {} ); + event = jQuery.event.fix( event || window.event || {} ); // Namespaced event handlers var parts = event.type.split("."); @@ -2065,12 +2065,12 @@ jQuery.event = { }, fix: function(event) { - // store a copy of the original event object + // store a copy of the original event object // and clone to set read-only properties var originalEvent = event; event = jQuery.extend({}, originalEvent); - - // add preventDefault and stopPropagation since + + // add preventDefault and stopPropagation since // they will not work on the clone event.preventDefault = function() { // if preventDefault exists run it on the original event @@ -2086,11 +2086,11 @@ jQuery.event = { // otherwise set the cancelBubble property of the original event to true (IE) originalEvent.cancelBubble = true; }; - + // Fix target property, if necessary if ( !event.target ) event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either - + // check if target is a textnode (safari) if ( event.target.nodeType == 3 ) event.target = originalEvent.target.parentNode; @@ -2105,11 +2105,11 @@ jQuery.event = { event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); } - + // Add which for key events if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) event.which = event.charCode || event.keyCode; - + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if ( !event.metaKey && event.ctrlKey ) event.metaKey = event.ctrlKey; @@ -2118,10 +2118,10 @@ jQuery.event = { // Note: button is not normalized, so don't use it if ( !event.which && event.button ) event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); - + return event; }, - + special: { ready: { setup: function() { @@ -2129,23 +2129,23 @@ jQuery.event = { bindReady(); return; }, - + teardown: function() { return; } }, - + mouseenter: { setup: function() { if ( jQuery.browser.msie ) return false; jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler); return true; }, - + teardown: function() { if ( jQuery.browser.msie ) return false; jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler); return true; }, - + handler: function(event) { // If we actually just moused on to a sub-element, ignore it if ( withinElement(event, this) ) return true; @@ -2154,20 +2154,20 @@ jQuery.event = { return jQuery.event.handle.apply(this, arguments); } }, - + mouseleave: { setup: function() { if ( jQuery.browser.msie ) return false; jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler); return true; }, - + teardown: function() { if ( jQuery.browser.msie ) return false; jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler); return true; }, - + handler: function(event) { // If we actually just moused on to a sub-element, ignore it if ( withinElement(event, this) ) return true; @@ -2185,7 +2185,7 @@ jQuery.fn.extend({ jQuery.event.add( this, type, fn || data, fn && data ); }); }, - + one: function( type, data, fn ) { return this.each(function(){ jQuery.event.add( this, type, function(event) { @@ -2220,10 +2220,10 @@ jQuery.fn.extend({ return this.click(function(event) { // Figure out which function to execute this.lastToggle = 0 == this.lastToggle ? 1 : 0; - + // Make sure that clicks stop event.preventDefault(); - + // and execute the function return args[this.lastToggle].apply( this, arguments ) || false; }); @@ -2232,7 +2232,7 @@ jQuery.fn.extend({ hover: function(fnOver, fnOut) { return this.bind('mouseenter', fnOver).bind('mouseleave', fnOut); }, - + ready: function(fn) { // Attach the listeners bindReady(); @@ -2241,12 +2241,12 @@ jQuery.fn.extend({ if ( jQuery.isReady ) // Execute the function immediately fn.call( document, jQuery ); - + // Otherwise, remember the function for later else // Add the function to the wait list jQuery.readyList.push( function() { return fn.call(this, jQuery); } ); - + return this; } }); @@ -2260,18 +2260,18 @@ jQuery.extend({ if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; - + // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them jQuery.each( jQuery.readyList, function(){ this.apply( document ); }); - + // Reset the list of functions jQuery.readyList = null; } - + // Trigger any bound ready events jQuery(document).triggerHandler("ready"); } @@ -2288,7 +2288,7 @@ function bindReady(){ if ( document.addEventListener && !jQuery.browser.opera) // Use the handy event callback document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); - + // If IE is used and is not in a frame // Continually check to see if the document is ready if ( jQuery.browser.msie && window == top ) (function(){ @@ -2341,9 +2341,9 @@ function bindReady(){ } jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + - "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + + "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + "submit,keydown,keypress,keyup,error").split(","), function(i, name){ - + // Handle event binding jQuery.fn[name] = function(fn){ return fn ? this.bind(name, fn) : this.trigger(name); @@ -2437,8 +2437,8 @@ jQuery.fn.extend({ jQuery.makeArray(this.elements) : this; }) .filter(function(){ - return this.name && !this.disabled && - (this.checked || /select|textarea/i.test(this.nodeName) || + return this.name && !this.disabled && + (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password/i.test(this.type)); }) .map(function(i, elem){ @@ -2469,7 +2469,7 @@ jQuery.extend({ callback = data; data = null; } - + return jQuery.ajax({ type: "GET", url: url, @@ -2517,7 +2517,7 @@ jQuery.extend({ username: null, password: null }, - + // Last-Modified header cache for next request lastModified: {}, @@ -2606,7 +2606,7 @@ jQuery.extend({ // Attach handlers for all browsers script.onload = script.onreadystatechange = function(){ - if ( !done && (!this.readyState || + if ( !done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") ) { done = true; success(); @@ -2649,7 +2649,7 @@ jQuery.extend({ // Allow custom headers/mimetypes if ( s.beforeSend ) s.beforeSend(xml); - + if ( s.global ) jQuery.event.trigger("ajaxSend", [xml, s]); @@ -2658,13 +2658,13 @@ jQuery.extend({ // The transfer is complete and the data is available, or the request timed out if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) { requestDone = true; - + // clear poll interval if (ival) { clearInterval(ival); ival = null; } - + status = isTimeout == "timeout" && "timeout" || !jQuery.httpSuccess( xml ) && "error" || s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" || @@ -2687,13 +2687,13 @@ jQuery.extend({ try { modRes = xml.getResponseHeader("Last-Modified"); } catch(e) {} // swallow exception thrown by FF if header is not available - + if ( s.ifModified && modRes ) jQuery.lastModified[s.url] = modRes; // JSONP handles its own success callback if ( !jsonp ) - success(); + success(); } else jQuery.handleError(s, xml, status); @@ -2705,10 +2705,10 @@ jQuery.extend({ xml = null; } }; - + if ( s.async ) { // don't attach the handler to the request, just poll it instead - var ival = setInterval(onreadystatechange, 13); + var ival = setInterval(onreadystatechange, 13); // Timeout checker if ( s.timeout > 0 ) @@ -2717,20 +2717,20 @@ jQuery.extend({ if ( xml ) { // Cancel the request xml.abort(); - + if( !requestDone ) onreadystatechange( "timeout" ); } }, s.timeout); } - + // Send the data try { xml.send(s.data); } catch(e) { jQuery.handleError(s, xml, null, e); } - + // firefox 1.5 doesn't fire statechange for sync requests if ( !s.async ) onreadystatechange(); @@ -2758,7 +2758,7 @@ jQuery.extend({ if ( s.global && ! --jQuery.active ) jQuery.event.trigger( "ajaxStop" ); } - + // return XMLHttpRequest to allow aborting the request etc. return xml; }, @@ -2853,7 +2853,7 @@ jQuery.fn.extend({ this.animate({ height: "show", width: "show", opacity: "show" }, speed, callback) : - + this.filter(":hidden").each(function(){ this.style.display = this.oldblock || ""; if ( jQuery.css(this,"display") == "none" ) { @@ -2863,13 +2863,13 @@ jQuery.fn.extend({ } }).end(); }, - + hide: function(speed,callback){ return speed ? this.animate({ height: "hide", width: "hide", opacity: "hide" }, speed, callback) : - + this.filter(":visible").each(function(){ this.oldblock = this.oldblock || jQuery.css(this,"display"); this.style.display = "none"; @@ -2878,7 +2878,7 @@ jQuery.fn.extend({ // Save the old toggle function _toggle: jQuery.fn.toggle, - + toggle: function( fn, fn2 ){ return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? this._toggle( fn, fn2 ) : @@ -2890,11 +2890,11 @@ jQuery.fn.extend({ jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); }); }, - + slideDown: function(speed,callback){ return this.animate({height: "show"}, speed, callback); }, - + slideUp: function(speed,callback){ return this.animate({height: "hide"}, speed, callback); }, @@ -2902,19 +2902,19 @@ jQuery.fn.extend({ slideToggle: function(speed, callback){ return this.animate({height: "toggle"}, speed, callback); }, - + fadeIn: function(speed, callback){ return this.animate({opacity: "show"}, speed, callback); }, - + fadeOut: function(speed, callback){ return this.animate({opacity: "hide"}, speed, callback); }, - + fadeTo: function(speed,to,callback){ return this.animate({opacity: to}, speed, callback); }, - + animate: function( prop, speed, easing, callback ) { var optall = jQuery.speed(speed, easing, callback); @@ -2924,7 +2924,7 @@ jQuery.fn.extend({ var opt = jQuery.extend({}, optall); var hidden = jQuery(this).is(":hidden"), self = this; - + for ( var p in prop ) { if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) return jQuery.isFunction(opt.complete) && opt.complete.apply(this); @@ -2942,7 +2942,7 @@ jQuery.fn.extend({ this.style.overflow = "hidden"; opt.curAnim = jQuery.extend({}, prop); - + jQuery.each( prop, function(name, val){ var e = new jQuery.fx( self, opt, name ); @@ -2977,7 +2977,7 @@ jQuery.fn.extend({ return true; }); }, - + queue: function(type, fn){ if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) { fn = type; @@ -2992,7 +2992,7 @@ jQuery.fn.extend({ queue(this, type, fn); else { queue(this, type).push( fn ); - + if ( queue(this, type).length == 1 ) fn.apply(this); } @@ -3034,7 +3034,7 @@ var queue = function( elem, type, array ) { var q = jQuery.data( elem, type + "queue" ); if ( !q || array ) - q = jQuery.data( elem, type + "queue", + q = jQuery.data( elem, type + "queue", array ? jQuery.makeArray(array) : [] ); return q; @@ -3054,19 +3054,19 @@ jQuery.fn.dequeue = function(type){ }; jQuery.extend({ - + speed: function(speed, easing, fn) { var opt = speed && speed.constructor == Object ? speed : { - complete: fn || !fn && easing || + complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && easing.constructor != Function && easing }; - opt.duration = (opt.duration && opt.duration.constructor == Number ? - opt.duration : + opt.duration = (opt.duration && opt.duration.constructor == Number ? + opt.duration : { slow: 600, fast: 200 }[opt.duration]) || 400; - + // Queueing opt.old = opt.complete; opt.complete = function(){ @@ -3075,10 +3075,10 @@ jQuery.extend({ if ( jQuery.isFunction( opt.old ) ) opt.old.apply( this ); }; - + return opt; }, - + easing: { linear: function( p, n, firstNum, diff ) { return firstNum + diff * p; @@ -3087,7 +3087,7 @@ jQuery.extend({ return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; } }, - + timers: [], timerId: null, @@ -3147,7 +3147,7 @@ jQuery.fx.prototype = { if ( jQuery.timerId == null ) { jQuery.timerId = setInterval(function(){ var timers = jQuery.timers; - + for ( var i = 0; i < timers.length; i++ ) if ( !timers[i]() ) timers.splice(i--, 1); @@ -3173,7 +3173,7 @@ jQuery.fx.prototype = { // flash of content if ( this.prop == "width" || this.prop == "height" ) this.elem.style[this.prop] = "1px"; - + // Start by showing the element jQuery(this.elem).show(); }, @@ -3208,7 +3208,7 @@ jQuery.fx.prototype = { if ( this.options.display != null ) { // Reset the overflow this.elem.style.overflow = this.options.overflow; - + // Reset the display this.elem.style.display = this.options.display; if ( jQuery.css(this.elem, "display") == "none" ) @@ -3270,23 +3270,23 @@ jQuery.fx.step = { // http://jquery.com/plugins/project/dimensions jQuery.fn.offset = function() { var left = 0, top = 0, elem = this[0], results; - + if ( elem ) with ( jQuery.browser ) { - var parent = elem.parentNode, + var parent = elem.parentNode, offsetChild = elem, - offsetParent = elem.offsetParent, + offsetParent = elem.offsetParent, doc = elem.ownerDocument, safari2 = safari && parseInt(version) < 522, fixed = jQuery.css(elem, "position") == "fixed"; - + // Use getBoundingClientRect if available if ( elem.getBoundingClientRect ) { var box = elem.getBoundingClientRect(); - + // Add the document scroll offsets add(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop)); - + // IE adds the HTML element's border, by default it is medium which is 2px // IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; } // IE 7 standards mode, the border is always 2px @@ -3294,54 +3294,54 @@ jQuery.fn.offset = function() { // However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS // Therefore this method will be off by 2px in IE while in quirksmode add( -doc.documentElement.clientLeft, -doc.documentElement.clientTop ); - + // Otherwise loop through the offsetParents and parentNodes } else { - + // Initial element offsets add( elem.offsetLeft, elem.offsetTop ); - + // Get parent offsets while ( offsetParent ) { // Add offsetParent offsets add( offsetParent.offsetLeft, offsetParent.offsetTop ); - + // Mozilla and Safari > 2 does not include the border on offset parents // However Mozilla adds the border for table or table cells if ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 ) border( offsetParent ); - + // Add the document scroll offsets if position is fixed on any offsetParent if ( !fixed && jQuery.css(offsetParent, "position") == "fixed" ) fixed = true; - + // Set offsetChild to previous offsetParent unless it is the body element offsetChild = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent; // Get next offsetParent offsetParent = offsetParent.offsetParent; } - + // Get parent scroll offsets while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) { // Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug if ( !/^inline|table.*$/i.test(jQuery.css(parent, "display")) ) // Subtract parent scroll offsets add( -parent.scrollLeft, -parent.scrollTop ); - + // Mozilla does not add the border for a parent that has overflow != visible if ( mozilla && jQuery.css(parent, "overflow") != "visible" ) border( parent ); - + // Get next parent parent = parent.parentNode; } - + // Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild // Mozilla doubles body offsets with a non-absolutely positioned offsetChild - if ( (safari2 && (fixed || jQuery.css(offsetChild, "position") == "absolute")) || + if ( (safari2 && (fixed || jQuery.css(offsetChild, "position") == "absolute")) || (mozilla && jQuery.css(offsetChild, "position") != "absolute") ) add( -doc.body.offsetLeft, -doc.body.offsetTop ); - + // Add the document scroll offsets if position is fixed if ( fixed ) add(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), @@ -3363,4 +3363,4 @@ jQuery.fn.offset = function() { return results; }; -})(); +})(); \ No newline at end of file diff --git a/webroot/js/loadingAnimation.gif b/webroot/js/loadingAnimation.gif index 82290f4..a70c32f 100644 Binary files a/webroot/js/loadingAnimation.gif and b/webroot/js/loadingAnimation.gif differ diff --git a/webroot/js/markitup/jquery.markitup.js b/webroot/js/markitup/jquery.markitup.js new file mode 100644 index 0000000..cca3d82 --- /dev/null +++ b/webroot/js/markitup/jquery.markitup.js @@ -0,0 +1,536 @@ +// ---------------------------------------------------------------------------- +// markItUp! Universal MarkUp Engine, JQuery plugin +// v 1.1.0 beta +// Dual licensed under the MIT and GPL licenses. +// ---------------------------------------------------------------------------- +// Copyright (C) 2007-2008 Jay Salvat +// http://markitup.jaysalvat.com/ +// ---------------------------------------------------------------------------- +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// ---------------------------------------------------------------------------- +(function($) { + $.fn.markItUp = function(settings, extraSettings) { + var options, ctrlKey, shiftKey, altKey; + ctrlKey = shiftKey = altKey = false; + + options = { id: '', + nameSpace: '', + root: '', + previewInWindow: '', //"width=800, height=600, resizable=yes, scrollbars=yes", + previewAutoRefresh: true, + previewPosition: 'after', + previewTemplatePath: '~/templates/preview.html', + previewParserPath: '', + previewParserVar: 'data', + resizeHandle: true, + beforeInsert: '', + afterInsert: '', + onEnter: {}, + onShiftEnter: {}, + onCtrlEnter: {}, + onTab: {}, + markupSet: [ { /* set */ } ] + }; + $.extend(options, settings, extraSettings); + + // compute markItUp! path + if (!options.root) { + $('script').each(function(a, tag) { + miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/); + if (miuScript !== null) { + options.root = miuScript[1]; + } + }); + } + + return this.each(function() { + var $$, textarea, levels, scrollPosition, caretPosition, caretOffset, + clicked, hash, header, footer, previewWindow, template, iFrame, abort; + $$ = $(this); + textarea = this; + levels = []; + abort = false; + scrollPosition = caretPosition = 0; + caretOffset = -1; + + options.previewParserPath = localize(options.previewParserPath); + options.previewTemplatePath = localize(options.previewTemplatePath); + + // apply the computed path to ~/ + function localize(data, inText) { + if (inText) { + return data.replace(/("|')~\//g, "$1"+options.root); + } + return data.replace(/^~\//, options.root); + } + + // init and build editor + function init() { + id = ''; nameSpace = ''; + if (options.id) { + id = 'id="'+options.id+'"'; + } else if ($$.attr("id")) { + id = 'id="markItUp'+($$.attr("id").substr(0, 1).toUpperCase())+($$.attr("id").substr(1))+'"'; + + } + if (options.nameSpace) { + nameSpace = 'class="'+options.nameSpace+'"'; + } + $$.wrap('<div '+nameSpace+'"></div>'); + $$.wrap('<div '+id+' class="markItUp"></div>'); + $$.wrap('<div class="markItUpContainer"></div>'); + $$.addClass("markItUpEditor"); + + // add the header before the textarea + header = $('<div class="markItUpHeader"></div>').insertBefore($$); + $(dropMenus(options.markupSet)).appendTo(header); + + // add the footer after the textarea + footer = $('<div class="markItUpFooter"></div>').insertAfter($$); + + // add the resize handle after textarea + if (options.resizeHandle === true && $.browser.safari !== true) { + resizeHandle = $('<div class="markItUpResizeHandle"></div>') + .insertAfter($$) + .bind("mousedown", function(e) { + var h = $$.height(), y = e.clientY, mouseMove, mouseUp; + mouseMove = function(e) { + $$.css("height", Math.max(20, e.clientY+h-y)+"px"); + return false; + }; + mouseUp = function(e) { + $("html").unbind("mousemove", mouseMove).unbind("mouseup", mouseUp); + return false; + }; + $("html").bind("mousemove", mouseMove).bind("mouseup", mouseUp); + }); + footer.append(resizeHandle); + } + + // listen key events + $$.keydown(keyPressed).keyup(keyPressed); + + // bind an event to catch external calls + $$.bind("insertion", function(e, settings) { + if (settings.target !== false) { + get(); + } + if (textarea === $.markItUp.focused) { + markup(settings); + } + }); + + // remember the last focus + $$.focus(function() { + $.markItUp.focused = this; + }); + } + + // recursively build header with dropMenus from markupset + function dropMenus(markupSet) { + var ul = $('<ul></ul>'), i = 0; + $('li:hover > ul', ul).css('display', 'block'); + $(markupSet).each(function() { + var button = this, t = '', title, li, j; + title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||''); + key = (button.key) ? 'accesskey="'+button.key+'"' : ''; + if (button.separator) { + li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul); + } else { + i++; + for (j = levels.length -1; j >= 0; j--) { + t += levels[j]+"-"; + } + li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>') + .bind("contextmenu", function() { // prevent contextmenu on mac and allow ctrl+click + return false; + }).click(function() { + return false; + }).mouseup(function() { + if (button.call) { + eval(button.call)(); + } + markup(button); + return false; + }).hover(function() { + $('> ul', this).show(); + $(document).one('click', function() { // close dropmenu if click outside + $('ul ul', header).hide(); + } + ); + }, function() { + $('> ul', this).hide(); + } + ).appendTo(ul); + if (button.dropMenu) { + levels.push(i); + $(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu)); + } + } + }); + levels.pop(); + return ul; + } + + // markItUp! markups + function magicMarkups(string) { + if (string) { + string = string.toString(); + string = string.replace(/\(\!\(([\s\S]*?)\)\!\)/g, + function(x, a) { + var b = a.split('|!|'); + if (altKey === true) { + return (b[1] !== undefined) ? b[1] : b[0]; + } else { + return (b[1] === undefined) ? "" : b[0]; + } + } + ); + // [![prompt]!], [![prompt:!:value]!] + string = string.replace(/\[\!\[([\s\S]*?)\]\!\]/g, + function(x, a) { + var b = a.split(':!:'); + if (abort === true) { + return false; + } + value = prompt(b[0], (b[1]) ? b[1] : ''); + if (value === null) { + abort = true; + } + return value; + } + ); + return string; + } + return ""; + } + + // prepare action + function prepare(action) { + if ($.isFunction(action)) { + action = action(hash); + } + return magicMarkups(action); + } + + // build block to insert + function build(string) { + openWith = prepare(clicked.openWith); + placeHolder = prepare(clicked.placeHolder); + replaceWith = prepare(clicked.replaceWith); + closeWith = prepare(clicked.closeWith); + if (replaceWith !== "") { + block = openWith + replaceWith + closeWith; + } else if (selection === '' && placeHolder !== '') { + block = openWith + placeHolder + closeWith; + } else { + block = openWith + (string||selection) + closeWith; + } + return {block: block, + + openWith: openWith, + replaceWith:replaceWith, + placeHolder:placeHolder, + closeWith: closeWith + }; + } + + // define markup to insert + function markup(button) { + var len, j, n, i; + hash = clicked = button; + get(); + + $.extend(hash, { line:"", root:options.root, textarea:textarea, selection:(selection||''), caretPosition:caretPosition }); + + // callbacks before insertion + prepare(options.beforeInsert); + prepare(clicked.beforeInsert); + if (ctrlKey === true && shiftKey === true) { + prepare(clicked.beforeMultiInsert); + } + $.extend(hash, { line:1 }); + + if (ctrlKey === true && shiftKey === true) { + lines = selection.split(/\r?\n/); + for (j = 0, n = lines.length, i = 0; i < n; i++) { + if ($.trim(lines[i]) !== '') { + $.extend(hash, { line:++j, selection:lines[i] } ); + lines[i] = build(lines[i]).block; + } else { + lines[i] = ""; + } + } + string = { block:lines.join('\n')}; + start = caretPosition; + len = string.block.length + (($.browser.opera) ? n : 0); + } else if (ctrlKey === true) { + string = build(selection); + start = caretPosition + string.openWith.length; + len = string.block.length - string.openWith.length - string.closeWith.length; + len -= fixIeBug(string.block); + } else if (shiftKey === true) { + string = build(selection); + start = caretPosition; + len = string.block.length; + len -= fixIeBug(string.block); + } else { + string = build(selection); + start = caretPosition + string.block.length ; + len = 0; + start -= fixIeBug(string.block); + } + if ((selection === '' && string.replaceWith === '')) { + caretOffset += fixOperaBug(string.block); + + start = caretPosition + string.openWith.length; + len = string.block.length - string.openWith.length - string.closeWith.length; + + caretOffset = $$.val().substring(caretPosition, $$.val().length).length; + caretOffset -= fixOperaBug($$.val().substring(0, caretPosition)); + } + $.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } ); + + if (string.block !== selection && abort === false) { + insert(string.block); + set(start, len); + } else { + caretOffset = -1; + } + get(); + + $.extend(hash, { line:'', selection:selection }); + + // callbacks after insertion + if (ctrlKey === true && shiftKey === true) { + prepare(clicked.afterMultiInsert); + } + prepare(clicked.afterInsert); + prepare(options.afterInsert); + + // refresh preview if opened + if (previewWindow && options.previewAutoRefresh) { + refreshPreview(); + } + + // reinit keyevent + shiftKey = altKey = ctrlKey = abort = false; + } + + // Substract linefeed in Opera + function fixOperaBug(string) { + if ($.browser.opera) { + return string.length - string.replace(/\n*/g, '').length; + } + return 0; + } + // Substract linefeed in IE + function fixIeBug(string) { + if ($.browser.msie) { + return string.length - string.replace(/\r*/g, '').length; + } + return 0; + } + + // add markup + function insert(block) { + if (document.selection) { + var newSelection = document.selection.createRange(); + newSelection.text = block; + } else { + $$.val($$.val().substring(0, caretPosition) + block + $$.val().substring(caretPosition + selection.length, $$.val().length)); + } + } + + // set a selection + function set(start, len) { + if (textarea.createTextRange){ + range = textarea.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', len); + + range.select(); + } else if (textarea.setSelectionRange ){ + textarea.setSelectionRange(start, start + len); + } + textarea.scrollTop = scrollPosition; + textarea.focus(); + } + + // get the selection + function get() { + textarea.focus(); + + scrollPosition = textarea.scrollTop; + if (document.selection) { + selection = document.selection.createRange().text; + if ($.browser.msie) { // ie + var range = document.selection.createRange(), rangeCopy = range.duplicate(); + rangeCopy.moveToElementText(textarea); + caretPosition = -1; + while(rangeCopy.inRange(range)) { // fix most of the ie bugs with linefeeds... + rangeCopy.moveStart('character'); + caretPosition ++; + } + } else { // opera + caretPosition = textarea.selectionStart; + } + } else { // gecko + caretPosition = textarea.selectionStart; + selection = $$.val().substring(caretPosition, textarea.selectionEnd); + } + return selection; + } + + // open preview window + function preview() { + if (!previewWindow || previewWindow.closed) { + if (options.previewInWindow) { + previewWindow = window.open('', 'preview', options.previewInWindow); + } else { + iFrame = $('<iframe class="markItUpPreviewFrame"></iframe>'); + if (options.previewPosition == 'after') { + iFrame.insertAfter(footer); + } else { + iFrame.insertBefore(header); + } + previewWindow = iFrame[iFrame.length-1].contentWindow || frame[iFrame.length-1]; + } + } else if (altKey === true) { + if (iFrame) { + iFrame.remove(); + } + previewWindow.close(); + previewWindow = iFrame = false; + } + if (!options.previewAutoRefresh) { + refreshPreview(); + } + if (options.previewInWindow) { + previewWindow.focus(); + } + } + + // refresh Preview window + function refreshPreview() { + if (previewWindow) { + previewWindow.document.open(); + previewWindow.document.write(renderPreview()); + previewWindow.document.close(); + } + } + + function renderPreview() { + if (options.previewParserPath !== '') { + $.ajax( { + type: 'POST', + async: false, + url: options.previewParserPath, + data: options.previewParserVar+'='+encodeURIComponent($$.val()), + success: function(data) { + html = localize(data, 1); + } + } ); + } else { + if (!template) { + $.ajax( { + async: false, + url: options.previewTemplatePath, + success: function(data) { + template = localize(data, 1); + } + } ); + } + html = template.replace(/<!-- content -->/g, $$.val()); + } + return html; + } + + // set keys pressed + function keyPressed(e) { + shiftKey = e.shiftKey; + altKey = e.altKey; + ctrlKey = (!(e.altKey && e.ctrlKey)) ? e.ctrlKey : false; + + $.extend(hash, { ctrlKey:ctrlKey, shiftKey:shiftKey, altKey:altKey }); + + if (e.type === 'keydown') { + if (ctrlKey === true) { + li = $("a[accesskey="+String.fromCharCode(e.keyCode)+"]", header).parent('li'); + if (li.length !== 0) { + ctrlKey = false; + li.triggerHandler('mouseup'); + return false; + } + } + if (e.keyCode === 13 || e.keyCode === 10) { // Enter key + if (ctrlKey === true) { // Enter + Ctrl + ctrlKey = false; + markup(options.onCtrlEnter); + return options.onCtrlEnter.keepDefault; + } else if (shiftKey === true) { // Enter + Shift + shiftKey = false; + markup(options.onShiftEnter); + return options.onShiftEnter.keepDefault; + } else { // only Enter + markup(options.onEnter); + return options.onEnter.keepDefault; + } + } + if (e.keyCode === 9) { // Tab key + if (caretOffset !== -1) { + get(); + caretOffset = $$.val().length - caretOffset; + set(caretOffset, 0); + caretOffset = -1; + return false; + } else { + markup(options.onTab); + return options.onTab.keepDefault; + } + } + } + } + + init(); + }); + }; + + $.fn.markItUpRemove = function() { + return this.each(function() { + $$ = $(this).unbind().removeClass('markItUpEditor'); + $$.parent('div').parent('div.markItUp').parent('div').replaceWith($$); + } + ); + }; + + $.markItUp = function(settings) { + var options = { target:false }; + $.extend(options, settings); + if (options.target) { + return $(options.target).each(function() { + $(this).focus(); + $(this).trigger('insertion', [options]); + }); + } else { + $('textarea').trigger('insertion', [options]); + } + }; +})(jQuery); \ No newline at end of file diff --git a/webroot/js/markitup/jquery.markitup.pack.js b/webroot/js/markitup/jquery.markitup.pack.js new file mode 100644 index 0000000..73c8c01 --- /dev/null +++ b/webroot/js/markitup/jquery.markitup.pack.js @@ -0,0 +1,9 @@ +// ---------------------------------------------------------------------------- +// markItUp! Universal MarkUp Engine, JQuery plugin +// v 1.1.0 beta +// Dual licensed under the MIT and GPL licenses. +// ---------------------------------------------------------------------------- +// Copyright (C) 2007-2008 Jay Salvat +// http://markitup.jaysalvat.com/ +// ---------------------------------------------------------------------------- +eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3($){$.2L.Y=3(f,g){C k,u,A,I;u=A=I=l;k={B:\'\',17:\'\',T:\'\',1w:\'\',1U:o,2w:\'2s\',1j:\'~/3l/1D.15\',1c:\'\',28:\'25\',1k:o,1B:\'\',1A:\'\',1z:{},1X:{},1V:{},1T:{},2E:[{}]};$.R(k,f,g);2(!k.T){$(\'3v\').1f(3(a,b){1N=$(b).11(0).3j.3f(/(.*)3c\\.3a(\\.37)?\\.34$/);2(1N!==2g){k.T=1N[1]}})}4 G.1f(3(){C d,q,16,18,m,D,J,L,Z,1x,w,1u,K,14;d=$(G);q=G;16=[];14=l;18=m=0;D=-1;k.1c=1i(k.1c);k.1j=1i(k.1j);3 1i(a,b){2(b){4 a.W(/("|\')~\\//g,"$1"+k.T)}4 a.W(/^~\\//,k.T)}3 2C(){B=\'\';17=\'\';2(k.B){B=\'B="\'+k.B+\'"\'}7 2(d.1S("B")){B=\'B="Y\'+(d.1S("B").2y(0,1).3z())+(d.1S("B").2y(1))+\'"\'}2(k.17){17=\'O="\'+k.17+\'"\'}d.1P(\'<v \'+17+\'"></v>\');d.1P(\'<v \'+B+\' O="Y"></v>\');d.1P(\'<v O="3u"></v>\');d.2r("2q");Z=$(\'<v O="3r"></v>\').2p(d);$(1M(k.2E)).1L(Z);1x=$(\'<v O="3p"></v>\').1K(d);2(k.1k===o&&$.1a.3k!==o){1k=$(\'<v O="3i"></v>\').1K(d).1b("3d",3(e){C h=d.2a(),y=e.2d,1n,1o;1n=3(e){d.2u("2a",31.30(20,e.2d+h-y)+"2Y");4 l};1o=3(e){$("15").1I("2t",1n).1I("1t",1o);4 l};$("15").1b("2t",1n).1b("1t",1o)});1x.2n(1k)}d.23(1Q).2R(1Q);d.1b("1C",3(e,a){2(a.1r!==l){11()}2(q===$.Y.21){V(a)}});d.1h(3(){$.Y.21=G})}3 1M(b){C c=$(\'<U></U>\'),i=0;$(\'z:1Y > U\',c).2u(\'2M\',\'p\');$(b).1f(3(){C a=G,t=\'\',1m,z,j;1m=(a.12)?(a.1W||\'\')+\' [3K+\'+a.12+\']\':(a.1W||\'\');12=(a.12)?\'2J="\'+a.12+\'"\':\'\';2(a.2I){z=$(\'<z O="3J">\'+(a.2I||\'\')+\'</z>\').1L(c)}7{i++;2H(j=16.5-1;j>=0;j--){t+=16[j]+"-"}z=$(\'<z O="2G 2G\'+t+(i)+\' \'+(a.3I||\'\')+\'"><a 3H="" \'+12+\' 1m="\'+1m+\'">\'+(a.1W||\'\')+\'</a></z>\').1b("3G",3(){4 l}).2F(3(){4 l}).1t(3(){2(a.2D){3F(a.2D)()}V(a);4 l}).1Y(3(){$(\'> U\',G).3E();$(N).3D(\'2F\',3(){$(\'U U\',Z).2A()})},3(){$(\'> U\',G).2A()}).1L(c);2(a.2z){16.3C(i);$(z).2r(\'3B\').2n(1M(a.2z))}}});16.3A();4 c}3 2x(c){2(c){c=c.3w();c=c.W(/\\(\\!\\(([\\s\\S]*?)\\)\\!\\)/g,3(x,a){C b=a.1R(\'|!|\');2(I===o){4(b[1]!==2v)?b[1]:b[0]}7{4(b[1]===2v)?"":b[0]}});c=c.W(/\\[\\!\\[([\\s\\S]*?)\\]\\!\\]/g,3(x,a){C b=a.1R(\':!:\');2(14===o){4 l}1O=3t(b[0],(b[1])?b[1]:\'\');2(1O===2g){14=o}4 1O});4 c}4""}3 F(a){2($.3s(a)){a=a(L)}4 2x(a)}3 1g(a){H=F(J.H);19=F(J.19);Q=F(J.Q);M=F(J.M);2(Q!==""){p=H+Q+M}7 2(6===\'\'&&19!==\'\'){p=H+19+M}7{p=H+(a||6)+M}4{p:p,H:H,Q:Q,19:19,M:M}}3 V(a){C b,j,n,i;L=J=a;11();$.R(L,{1v:"",T:k.T,q:q,6:(6||\'\'),m:m});F(k.1B);F(J.1B);2(u===o&&A===o){F(J.3q)}$.R(L,{1v:1});2(u===o&&A===o){P=6.1R(/\\r?\\n/);2H(j=0,n=P.5,i=0;i<n;i++){2($.3o(P[i])!==\'\'){$.R(L,{1v:++j,6:P[i]});P[i]=1g(P[i]).p}7{P[i]=""}}8={p:P.3n(\'\\n\')};X=m;b=8.p.5+(($.1a.2m)?n:0)}7 2(u===o){8=1g(6);X=m+8.H.5;b=8.p.5-8.H.5-8.M.5;b-=1q(8.p)}7 2(A===o){8=1g(6);X=m;b=8.p.5;b-=1q(8.p)}7{8=1g(6);X=m+8.p.5;b=0;X-=1q(8.p)}2((6===\'\'&&8.Q===\'\')){D+=1J(8.p);X=m+8.H.5;b=8.p.5-8.H.5-8.M.5;D=d.E().1e(m,d.E().5).5;D-=1J(d.E().1e(0,m))}$.R(L,{m:m,18:18});2(8.p!==6&&14===l){2l(8.p);1H(X,b)}7{D=-1}11();$.R(L,{1v:\'\',6:6});2(u===o&&A===o){F(J.3h)}F(J.1A);F(k.1A);2(w&&k.1U){1F()}A=I=u=14=l}3 1J(a){2($.1a.2m){4 a.5-a.W(/\\n*/g,\'\').5}4 0}3 1q(a){2($.1a.2i){4 a.5-a.W(/\\r*/g,\'\').5}4 0}3 2l(a){2(N.6){C b=N.6.1E();b.2h=a}7{d.E(d.E().1e(0,m)+a+d.E().1e(m+6.5,d.E().5))}}3 1H(a,b){2(q.2e){1d=q.2e();1d.3b(o);1d.29(\'1G\',a);1d.39(\'1G\',b);1d.38()}7 2(q.2c){q.2c(a,a+b)}q.2b=18;q.1h()}3 11(){q.1h();18=q.2b;2(N.6){6=N.6.1E().2h;2($.1a.2i){C a=N.6.1E(),1p=a.36();1p.35(q);m=-1;33(1p.32(a)){1p.29(\'1G\');m++}}7{m=q.2k}}7{m=q.2k;6=d.E().1e(m,q.3e)}4 6}3 1D(){2(!w||w.2Z){2(k.1w){w=3g.2f(\'\',\'1D\',k.1w)}7{K=$(\'<2j O="2X"></2j>\');2(k.2w==\'2s\'){K.1K(1x)}7{K.2p(Z)}w=K[K.5-1].2W||2V[K.5-1]}}7 2(I===o){2(K){K.3m()}w.27();w=K=l}2(!k.1U){1F()}2(k.1w){w.1h()}}3 1F(){2(w){w.N.2f();w.N.2U(26());w.N.27()}}3 26(){2(k.1c!==\'\'){$.2o({24:\'2T\',2K:l,2B:k.1c,25:k.28+\'=\'+2S(d.E()),22:3(a){15=1i(a,1)}})}7{2(!1u){$.2o({2K:l,2B:k.1j,22:3(a){1u=1i(a,1)}})}15=1u.W(/<!-- 3x -->/g,d.E())}4 15}3 1Q(e){A=e.A;I=e.I;u=(!(e.I&&e.u))?e.u:l;$.R(L,{u:u,A:A,I:I});2(e.24===\'23\'){2(u===o){z=$("a[2J="+3y.2Q(e.1l)+"]",Z).1s(\'z\');2(z.5!==0){u=l;z.2P(\'1t\');4 l}}2(e.1l===13||e.1l===10){2(u===o){u=l;V(k.1V);4 k.1V.1y}7 2(A===o){A=l;V(k.1X);4 k.1X.1y}7{V(k.1z);4 k.1z.1y}}2(e.1l===9){2(D!==-1){11();D=d.E().5-D;1H(D,0);D=-1;4 l}7{V(k.1T);4 k.1T.1y}}}}2C()})};$.2L.2O=3(){4 G.1f(3(){$$=$(G).1I().2N(\'2q\');$$.1s(\'v\').1s(\'v.Y\').1s(\'v\').Q($$)})};$.Y=3(a){C b={1r:l};$.R(b,a);2(b.1r){4 $(b.1r).1f(3(){$(G).1h();$(G).1Z(\'1C\',[b])})}7{$(\'q\').1Z(\'1C\',[b])}}})(3L);',62,234,'||if|function|return|length|selection|else|string|||||||||||||false|caretPosition||true|block|textarea||||ctrlKey|div|previewWindow|||li|shiftKey|id|var|caretOffset|val|prepare|this|openWith|altKey|clicked|iFrame|hash|closeWith|document|class|lines|replaceWith|extend||root|ul|markup|replace|start|markItUp|header||get|key||abort|html|levels|nameSpace|scrollPosition|placeHolder|browser|bind|previewParserPath|range|substring|each|build|focus|localize|previewTemplatePath|resizeHandle|keyCode|title|mouseMove|mouseUp|rangeCopy|fixIeBug|target|parent|mouseup|template|line|previewInWindow|footer|keepDefault|onEnter|afterInsert|beforeInsert|insertion|preview|createRange|refreshPreview|character|set|unbind|fixOperaBug|insertAfter|appendTo|dropMenus|miuScript|value|wrap|keyPressed|split|attr|onTab|previewAutoRefresh|onCtrlEnter|name|onShiftEnter|hover|trigger||focused|success|keydown|type|data|renderPreview|close|previewParserVar|moveStart|height|scrollTop|setSelectionRange|clientY|createTextRange|open|null|text|msie|iframe|selectionStart|insert|opera|append|ajax|insertBefore|markItUpEditor|addClass|after|mousemove|css|undefined|previewPosition|magicMarkups|substr|dropMenu|hide|url|init|call|markupSet|click|markItUpButton|for|separator|accesskey|async|fn|display|removeClass|markItUpRemove|triggerHandler|fromCharCode|keyup|encodeURIComponent|POST|write|frame|contentWindow|markItUpPreviewFrame|px|closed|max|Math|inRange|while|js|moveToElementText|duplicate|pack|select|moveEnd|markitup|collapse|jquery|mousedown|selectionEnd|match|window|afterMultiInsert|markItUpResizeHandle|src|safari|templates|remove|join|trim|markItUpFooter|beforeMultiInsert|markItUpHeader|isFunction|prompt|markItUpContainer|script|toString|content|String|toUpperCase|pop|markItUpDropMenu|push|one|show|eval|contextmenu|href|className|markItUpSeparator|Ctrl|jQuery'.split('|'),0,{})) \ No newline at end of file diff --git a/webroot/js/markitup/readme.txt b/webroot/js/markitup/readme.txt new file mode 100644 index 0000000..f096465 --- /dev/null +++ b/webroot/js/markitup/readme.txt @@ -0,0 +1,45 @@ +markItUp! 1.1.0 + +CHANGE LOG +markItUp! 1.1.0 2008-05-07 +- Modified: Textarea's id is no more moved to the main container +- Modified: NameSpace Span become a Div to remain strict +- Added: Relative path to the script is computed +- Added: Relative path to the script passed to callbacks +- Added: Global instance ID property +- Added: $(element).markItUpRemove() to remove markItUp! +- Added: Resize handle is now optional with resizeHandle property +- Added: Property previewInWindow is added and accept window parameter +- Added: Property previewPosition is added +- Modified: Resize handle is no more displayed in Safari to avoid repetition with the native handle +- Modified: Property previewIframeRefresh become previewAutorefresh +- Modified: Built-in Html Preview call a template file +- Improved: Autorefreshing is now apply for preview in window too +- Improved: Cancel button in prompt window cancel now the whole insertion process +- Improved: Cleaner markItUp! code added to the DOM +- Removed: Depreciated preview properties as previewBaseUrl, previewCharset, previewCssPath, previewBodyId, previewBodyClassName +- Removed: Property previewIframe not longer exists +- Fixed: "Magic markups" works with line feeds +- Fixed: Key events are initialized after insertion +- Fixed: Internet Explorer line feed offset bug +- Fixed: Shortcut keys on Mac OS +- Fixed: Ctrl+click works and doesn't open Mac context menu anymore +- Fixed: Ctrl+click works and doesn't open the page in a new tab anymore +- Fixed: Minor Css modifications + +markItUp! 1.0.3 2008-04-04 +- Fixed: IE7 Preview empty baseurl problem +- Fixed: IE7 external targeted insertion +- Added: Property scrollPosition is passed to callbacks functions + +markItUp! 1.0.2 2008-03-31 +- Fixed: IE7 Html preview problems +- Fixed: Selection is kept if nothing is inserted +- Improved: Code minified + +markItUp! 1.0.1 2008-03-21 +- Removed: Global PlaceHolder +- Modified: Property previewCharset is setted to "utf-8" by default + +markItUp! 1.0.0 2008-03-01 +- First public release \ No newline at end of file diff --git a/webroot/js/markitup/sets/default/images/bold.png b/webroot/js/markitup/sets/default/images/bold.png new file mode 100644 index 0000000..889ae80 Binary files /dev/null and b/webroot/js/markitup/sets/default/images/bold.png differ diff --git a/webroot/js/markitup/sets/default/images/clean.png b/webroot/js/markitup/sets/default/images/clean.png new file mode 100644 index 0000000..7e7cefb Binary files /dev/null and b/webroot/js/markitup/sets/default/images/clean.png differ diff --git a/webroot/js/markitup/sets/default/images/code.png b/webroot/js/markitup/sets/default/images/code.png new file mode 100644 index 0000000..0c76bd1 Binary files /dev/null and b/webroot/js/markitup/sets/default/images/code.png differ diff --git a/webroot/js/markitup/sets/default/images/image.png b/webroot/js/markitup/sets/default/images/image.png new file mode 100644 index 0000000..fc3c393 Binary files /dev/null and b/webroot/js/markitup/sets/default/images/image.png differ diff --git a/webroot/js/markitup/sets/default/images/italic.png b/webroot/js/markitup/sets/default/images/italic.png new file mode 100644 index 0000000..8482ac8 Binary files /dev/null and b/webroot/js/markitup/sets/default/images/italic.png differ diff --git a/webroot/js/markitup/sets/default/images/link.png b/webroot/js/markitup/sets/default/images/link.png new file mode 100644 index 0000000..25eacb7 Binary files /dev/null and b/webroot/js/markitup/sets/default/images/link.png differ diff --git a/webroot/js/markitup/sets/default/images/list-bullet.png b/webroot/js/markitup/sets/default/images/list-bullet.png new file mode 100644 index 0000000..4a8672b Binary files /dev/null and b/webroot/js/markitup/sets/default/images/list-bullet.png differ diff --git a/webroot/js/markitup/sets/default/images/list-item.png b/webroot/js/markitup/sets/default/images/list-item.png new file mode 100644 index 0000000..8cb4d69 Binary files /dev/null and b/webroot/js/markitup/sets/default/images/list-item.png differ diff --git a/webroot/js/markitup/sets/default/images/list-numeric.png b/webroot/js/markitup/sets/default/images/list-numeric.png new file mode 100644 index 0000000..33b0b8d Binary files /dev/null and b/webroot/js/markitup/sets/default/images/list-numeric.png differ diff --git a/webroot/js/markitup/sets/default/images/paragraph.png b/webroot/js/markitup/sets/default/images/paragraph.png new file mode 100644 index 0000000..95704fb Binary files /dev/null and b/webroot/js/markitup/sets/default/images/paragraph.png differ diff --git a/webroot/js/markitup/sets/default/images/picture.png b/webroot/js/markitup/sets/default/images/picture.png new file mode 100644 index 0000000..4a158fe Binary files /dev/null and b/webroot/js/markitup/sets/default/images/picture.png differ diff --git a/webroot/js/markitup/sets/default/images/preview.png b/webroot/js/markitup/sets/default/images/preview.png new file mode 100644 index 0000000..a9925a0 Binary files /dev/null and b/webroot/js/markitup/sets/default/images/preview.png differ diff --git a/webroot/js/markitup/sets/default/images/stroke.png b/webroot/js/markitup/sets/default/images/stroke.png new file mode 100644 index 0000000..612058a Binary files /dev/null and b/webroot/js/markitup/sets/default/images/stroke.png differ diff --git a/webroot/js/markitup/sets/default/set.js b/webroot/js/markitup/sets/default/set.js new file mode 100644 index 0000000..0b70889 --- /dev/null +++ b/webroot/js/markitup/sets/default/set.js @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------- +// markItUp! +// ---------------------------------------------------------------------------- +// Copyright (C) 2007 Jay Salvat +// http://markitup.jaysalvat.com/ +// ---------------------------------------------------------------------------- +// Html tags +// http://en.wikipedia.org/wiki/html +// ---------------------------------------------------------------------------- +// Basic set. Feel free to add more tags +// ---------------------------------------------------------------------------- +mySettings = { + nameSpace: "html", + onShiftEnter: {keepDefault:false, replaceWith:'<br />\n'}, + onCtrlEnter: {keepDefault:false, openWith:'\n<p>', closeWith:'</p>'}, + onTab: {keepDefault:false, replaceWith:' '}, + markupSet: [ + {name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' }, + {name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' }, + {name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' }, + {separator:'---------------' }, + {name:'Paragraph', openWith:'<p(!( class="[![Class]!]")!)>', closeWith:'</p>' }, + {name:'Code', openWith:'\n<pre>\n', closeWith:'\n</pre>\n' }, + {separator:'---------------' }, + {name:'Ul', openWith:'<ul>\n', closeWith:'</ul>\n' }, + {name:'Ol', openWith:'<ol>\n', closeWith:'</ol>\n' }, + {name:'Li', openWith:'<li>', closeWith:'</li>' }, + {separator:'---------------' }, + {name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' }, + {separator:'---------------' }, + {name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } }, + //{name:'Preview', className:'preview', call:'preview'} + ] +} \ No newline at end of file diff --git a/webroot/js/markitup/sets/default/style.css b/webroot/js/markitup/sets/default/style.css new file mode 100644 index 0000000..0be38ff --- /dev/null +++ b/webroot/js/markitup/sets/default/style.css @@ -0,0 +1,41 @@ +/* ------------------------------------------------------------------- +// markItUp! +// By Jay Salvat - http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------*/ + +.markItUp .markItUpButton1 a { + background-image:url(images/bold.png); +} +.markItUp .markItUpButton2 a { + background-image:url(images/italic.png); +} +.markItUp .markItUpButton3 a { + background-image:url(images/stroke.png); +} +.markItUp .markItUpButton4 a { + background-image:url(images/paragraph.png); +} +.markItUp .markItUpButton5 a { + background-image:url(images/code.png); +} +.markItUp .markItUpButton6 a { + background-image:url(images/link.png); +} + + +.markItUp .markItUpButton7 a { + background-image:url(images/list-bullet.png); +} +.markItUp .markItUpButton8 a { + background-image:url(images/list-numeric.png); +} +.markItUp .markItUpButton9 a { + background-image:url(images/list-item.png); +} + +.markItUp .clean a { + background-image:url(images/clean.png); +} +.markItUp .preview a { + background-image:url(images/preview.png); +} \ No newline at end of file diff --git a/webroot/js/markitup/sets/toolbar settings b/webroot/js/markitup/sets/toolbar settings new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/webroot/js/markitup/sets/toolbar settings @@ -0,0 +1 @@ +empty \ No newline at end of file diff --git a/webroot/js/markitup/skins/editor skins b/webroot/js/markitup/skins/editor skins new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/webroot/js/markitup/skins/editor skins @@ -0,0 +1 @@ +empty \ No newline at end of file diff --git a/webroot/js/markitup/skins/markitup/images/bg-container.png b/webroot/js/markitup/skins/markitup/images/bg-container.png new file mode 100644 index 0000000..2f0aa6c Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-container.png differ diff --git a/webroot/js/markitup/skins/markitup/images/bg-editor-bbcode.png b/webroot/js/markitup/skins/markitup/images/bg-editor-bbcode.png new file mode 100644 index 0000000..39cdbd8 Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-editor-bbcode.png differ diff --git a/webroot/js/markitup/skins/markitup/images/bg-editor-dotclear.png b/webroot/js/markitup/skins/markitup/images/bg-editor-dotclear.png new file mode 100644 index 0000000..b3188dc Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-editor-dotclear.png differ diff --git a/webroot/js/markitup/skins/markitup/images/bg-editor-html.png b/webroot/js/markitup/skins/markitup/images/bg-editor-html.png new file mode 100644 index 0000000..11bff45 Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-editor-html.png differ diff --git a/webroot/js/markitup/skins/markitup/images/bg-editor-json.png b/webroot/js/markitup/skins/markitup/images/bg-editor-json.png new file mode 100644 index 0000000..e898c1d Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-editor-json.png differ diff --git a/webroot/js/markitup/skins/markitup/images/bg-editor-markdown.png b/webroot/js/markitup/skins/markitup/images/bg-editor-markdown.png new file mode 100644 index 0000000..c199715 Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-editor-markdown.png differ diff --git a/webroot/js/markitup/skins/markitup/images/bg-editor-textile.png b/webroot/js/markitup/skins/markitup/images/bg-editor-textile.png new file mode 100644 index 0000000..3ab1e9f Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-editor-textile.png differ diff --git a/webroot/js/markitup/skins/markitup/images/bg-editor-wiki.png b/webroot/js/markitup/skins/markitup/images/bg-editor-wiki.png new file mode 100644 index 0000000..7887181 Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-editor-wiki.png differ diff --git a/webroot/js/markitup/skins/markitup/images/bg-editor-xml.png b/webroot/js/markitup/skins/markitup/images/bg-editor-xml.png new file mode 100644 index 0000000..33b1c5d Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-editor-xml.png differ diff --git a/webroot/js/markitup/skins/markitup/images/bg-editor.png b/webroot/js/markitup/skins/markitup/images/bg-editor.png new file mode 100644 index 0000000..ab7cde4 Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/bg-editor.png differ diff --git a/webroot/js/markitup/skins/markitup/images/handle.png b/webroot/js/markitup/skins/markitup/images/handle.png new file mode 100644 index 0000000..3993b20 Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/handle.png differ diff --git a/webroot/js/markitup/skins/markitup/images/menu.png b/webroot/js/markitup/skins/markitup/images/menu.png new file mode 100644 index 0000000..c817adc Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/menu.png differ diff --git a/webroot/js/markitup/skins/markitup/images/submenu.png b/webroot/js/markitup/skins/markitup/images/submenu.png new file mode 100644 index 0000000..03d1977 Binary files /dev/null and b/webroot/js/markitup/skins/markitup/images/submenu.png differ diff --git a/webroot/js/markitup/skins/markitup/style.css b/webroot/js/markitup/skins/markitup/style.css new file mode 100644 index 0000000..75ed4dd --- /dev/null +++ b/webroot/js/markitup/skins/markitup/style.css @@ -0,0 +1,148 @@ +/* ------------------------------------------------------------------- +// markItUp! Universal MarkUp Engine, JQuery plugin +// By Jay Salvat - http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------*/ +.markItUp * { + margin:0px; padding:0px; + outline:none; +} +.markItUp a:link, +.markItUp a:visited { + color:#000; + text-decoration:none; +} +.markItUp { + width:700px; + margin:5px 0 5px 0; + border:5px solid #F5F5F5; +} +.markItUpContainer { + border:1px solid #3C769D; + background:#FFF url(images/bg-container.png) repeat-x top left; + padding:5px 5px 2px 5px; + font:11px Verdana, Arial, Helvetica, sans-serif; +} +.markItUpEditor { + font:12px 'Courier New', Courier, monospace; + padding:5px 5px 5px 35px; + border:3px solid #3C769D; + width:643px; + height:320px; + background-image:url(images/bg-editor.png); + background-repeat:no-repeat; + clear:both; display:block; + line-height:18px; + overflow:auto; +} +.markItUpPreviewFrame { + overflow:auto; + background-color:#FFFFFF; + border:1px solid #3C769D; + width:99.9%; + height:300px; + margin:5px 0; +} +.markItUpFooter { + width:100%; + cursor:n-resize; +} +.markItUpResizeHandle { + overflow:hidden; + width:22px; height:5px; + margin-left:auto; + margin-right:auto; + background-image:url(images/handle.png); + cursor:n-resize; +} +/***************************************************************************************/ +/* first row of buttons */ +.markItUpHeader ul li { + list-style:none; + float:left; + position:relative; +} +.markItUpHeader ul li ul{ + display:none; +} +.markItUpHeader ul li:hover > ul{ + display:block; +} +.markItUpHeader ul .markItUpDropMenu { + background:transparent url(images/menu.png) no-repeat 115% 50%; + margin-right:5px; +} +.markItUpHeader ul .markItUpDropMenu li { + margin-right:0px; +} +.markItUpHeader ul .markItUpSeparator { + margin:0 10px; + width:1px; + height:16px; + overflow:hidden; + background-color:#CCC; +} +.markItUpHeader ul ul .markItUpSeparator { + width:auto; height:1px; + margin:0px; +} +/* next rows of buttons */ +.markItUpHeader ul ul { + display:none; + position:absolute; + top:18px; left:0px; + background:#F5F5F5; + border:1px solid #3C769D; + height:inherit; +} +.markItUpHeader ul ul li { + float:none; + border-bottom:1px solid #3C769D; +} +.markItUpHeader ul ul .markItUpDropMenu { + background:#F5F5F5 url(images/submenu.png) no-repeat 100% 50%; +} +/* next rows of buttons */ +.markItUpHeader ul ul ul { + position:absolute; + top:-1px; left:150px; +} +.markItUpHeader ul ul ul li { + float:none; +} +.markItUpHeader ul a { + display:block; + width:16px; height:16px; + text-indent:-10000px; + background-repeat:no-repeat; + padding:3px; + margin:0px; +} +.markItUpHeader ul ul a { + display:block; + padding-left:0px; + text-indent:0; + width:120px; + padding:5px 5px 5px 25px; + background-position:2px 50%; +} +.markItUpHeader ul ul a:hover { + color:#FFF; + background-color:#3C769D; +} +/***************************************************************************************/ +.html .markItUpEditor { + background-image:url(images/bg-editor-html.png); +} +.markdown .markItUpEditor { + background-image:url(images/bg-editor-markdown.png); +} +.textile .markItUpEditor { + background-image:url(images/bg-editor-textile.png); +} +.bbcode .markItUpEditor { + background-image:url(images/bg-editor-bbcode.png); +} +.wiki .markItUpEditor, +.dotclear .markItUpEditor { + background-image:url(images/bg-editor-wiki.png); +} \ No newline at end of file diff --git a/webroot/js/markitup/skins/simple/images/handle.png b/webroot/js/markitup/skins/simple/images/handle.png new file mode 100644 index 0000000..3993b20 Binary files /dev/null and b/webroot/js/markitup/skins/simple/images/handle.png differ diff --git a/webroot/js/markitup/skins/simple/images/menu.png b/webroot/js/markitup/skins/simple/images/menu.png new file mode 100644 index 0000000..c817adc Binary files /dev/null and b/webroot/js/markitup/skins/simple/images/menu.png differ diff --git a/webroot/js/markitup/skins/simple/images/submenu.png b/webroot/js/markitup/skins/simple/images/submenu.png new file mode 100644 index 0000000..03d1977 Binary files /dev/null and b/webroot/js/markitup/skins/simple/images/submenu.png differ diff --git a/webroot/js/markitup/skins/simple/style.css b/webroot/js/markitup/skins/simple/style.css new file mode 100644 index 0000000..2fe3d4d --- /dev/null +++ b/webroot/js/markitup/skins/simple/style.css @@ -0,0 +1,118 @@ +/* ------------------------------------------------------------------- +// markItUp! Universal MarkUp Engine, JQuery plugin +// By Jay Salvat - http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------*/ +.markItUp * { + margin:0px; padding:0px; + outline:none; +} +.markItUp a:link, +.markItUp a:visited { + color:#000; + text-decoration:none; +} +.markItUp { + width:700px; + margin:5px 0 5px 0; +} +.markItUpContainer { + font:11px Verdana, Arial, Helvetica, sans-serif; +} +.markItUpEditor { + font:12px 'Courier New', Courier, monospace; + padding:5px; + width:690px; + height:320px; + clear:both; display:block; + line-height:18px; + overflow:auto; +} +.markItUpPreviewFrame { + overflow:auto; + background-color:#FFFFFF; + width:99.9%; + height:300px; + margin:5px 0; +} +.markItUpFooter { + width:100%; +} +.markItUpResizeHandle { + overflow:hidden; + width:22px; height:5px; + margin-left:auto; + margin-right:auto; + background-image:url(images/handle.png); + cursor:n-resize; +} +/***************************************************************************************/ +/* first row of buttons */ +.markItUpHeader ul li { + list-style:none; + float:left; + position:relative; +} +.markItUpHeader ul li:hover > ul{ + display:block; +} +.markItUpHeader ul .markItUpDropMenu { + background:transparent url(images/menu.png) no-repeat 115% 50%; + margin-right:5px; +} +.markItUpHeader ul .markItUpDropMenu li { + margin-right:0px; +} +/* next rows of buttons */ +.markItUpHeader ul ul { + display:none; + position:absolute; + top:18px; left:0px; + background:#FFF; + border:1px solid #000; +} +.markItUpHeader ul ul li { + float:none; + border-bottom:1px solid #000; +} +.markItUpHeader ul ul .markItUpDropMenu { + background:#FFF url(images/submenu.png) no-repeat 100% 50%; +} +.markItUpHeader ul .markItUpSeparator { + margin:0 10px; + width:1px; + height:16px; + overflow:hidden; + background-color:#CCC; +} +.markItUpHeader ul ul .markItUpSeparator { + width:auto; height:1px; + margin:0px; +} +/* next rows of buttons */ +.markItUpHeader ul ul ul { + position:absolute; + top:-1px; left:150px; +} +.markItUpHeader ul ul ul li { + float:none; +} +.markItUpHeader ul a { + display:block; + width:16px; height:16px; + text-indent:-10000px; + background-repeat:no-repeat; + padding:3px; + margin:0px; +} +.markItUpHeader ul ul a { + display:block; + padding-left:0px; + text-indent:0; + width:120px; + padding:5px 5px 5px 25px; + background-position:2px 50%; +} +.markItUpHeader ul ul a:hover { + color:#FFF; + background-color:#000; +} \ No newline at end of file diff --git a/webroot/js/markitup/templates/preview templates b/webroot/js/markitup/templates/preview templates new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/webroot/js/markitup/templates/preview templates @@ -0,0 +1 @@ +empty \ No newline at end of file diff --git a/webroot/js/markitup/templates/preview.css b/webroot/js/markitup/templates/preview.css new file mode 100644 index 0000000..ad91a87 --- /dev/null +++ b/webroot/js/markitup/templates/preview.css @@ -0,0 +1,5 @@ +/* preview style examples */ +body { + background-color:#EFEFEF; + font:70% Verdana, Arial, Helvetica, sans-serif; +} \ No newline at end of file diff --git a/webroot/js/markitup/templates/preview.html b/webroot/js/markitup/templates/preview.html new file mode 100644 index 0000000..b8b3702 --- /dev/null +++ b/webroot/js/markitup/templates/preview.html @@ -0,0 +1,11 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>markItUp! preview template</title> +<link rel="stylesheet" type="text/css" href="~/templates/preview.css" /> +</head> +<body> +<!-- content --> +</body> +</html> diff --git a/webroot/js/markitup/utils/tools and scripts b/webroot/js/markitup/utils/tools and scripts new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/webroot/js/markitup/utils/tools and scripts @@ -0,0 +1 @@ +empty \ No newline at end of file diff --git a/webroot/js/scripts.js b/webroot/js/scripts.js index 23af629..579a965 100644 --- a/webroot/js/scripts.js +++ b/webroot/js/scripts.js @@ -46,10 +46,10 @@ $(document).ready(function() { $('ul.tree-options').hide().after('&nbsp;<a href="#" class="treeOptionsToggle">Show Options</a>'); $('a.treeOptionsToggle').click(function(){ if ($(this).prev('ul').toggle().is(':visible')) { - $(this).text('Hide Options'); + $(this).text('Hide Options'); } else { - $(this).text('Show Options'); + $(this).text('Show Options'); } return false; }); -}); +}); \ No newline at end of file diff --git a/webroot/js/vendors.php b/webroot/js/vendors.php index 7bfe03f..4dd1746 100644 --- a/webroot/js/vendors.php +++ b/webroot/js/vendors.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: vendors.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -22,9 +21,6 @@ * @package cake * @subpackage cake.app.webroot.js * @since CakePHP v 0.2.9 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ /** diff --git a/webroot/test.php b/webroot/test.php index ce814f8..ce55bcb 100644 --- a/webroot/test.php +++ b/webroot/test.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id: test.php 689 2008-11-05 10:30:07Z AD7six $ */ /** * Short description for file. * @@ -21,9 +20,6 @@ * @package cake * @subpackage cake.cake.tests.libs * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision: 689 $ - * @modifiedby $LastChangedBy: AD7six $ - * @lastmodified $Date: 2008-11-05 11:30:07 +0100 (Wed, 05 Nov 2008) $ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ error_reporting(E_ALL);