Skip to content

Commit

Permalink
Merge pull request #7774 from CakeDC/5.x
Browse files Browse the repository at this point in the history
Added / Reviewed Spanish translations
  • Loading branch information
othercorey authored Nov 24, 2023
2 parents b7cf0de + bb2a262 commit d791f5c
Show file tree
Hide file tree
Showing 101 changed files with 12,725 additions and 2,388 deletions.
2 changes: 2 additions & 0 deletions config/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@
.. |phpversion| replace:: **8.2**
.. |minphpversion| replace:: 8.1
"""

# todo_include_todos = True
10 changes: 5 additions & 5 deletions en/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ is invoked at the end of a Controller's constructor for this kind of use::
{
public function initialize(): void
{
// Always enable the CSRF component.
$this->loadComponent('Csrf');
// Always enable the FormProtection component.
$this->loadComponent('FormProtection');
}
}

Expand Down Expand Up @@ -320,8 +320,8 @@ actions, you can call ``addClasses()`` within your action too::
// Rest of the action code
}

If within your controller actions you need to process request or load data
differently based on the controller action you can use
If within your controller actions you need to process the request or load data
differently based on the content type you can use
:ref:`check-the-request`::

// In a controller action
Expand Down Expand Up @@ -510,7 +510,7 @@ want loaded, and any configuration data for them::
public function initialize(): void
{
parent::initialize();
$this->loadComponent('Csrf');
$this->loadComponent('Flash');
$this->loadComponent('Comments', Configure::read('Comments'));
}

Expand Down
13 changes: 6 additions & 7 deletions en/controllers/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Configuring Components
======================

Many of the core components require configuration. One example would be
the :doc:`/controllers/components/form-protection`. Configuration for these components,
the :doc:`/controllers/components/form-protection`. Configuration for these components,
and for components in general, is usually done via ``loadComponent()`` in your
Controller's ``initialize()`` method or via the ``$components`` array::

Expand All @@ -37,9 +37,8 @@ Controller's ``initialize()`` method or via the ``$components`` array::
$this->loadComponent('FormProtection', [
'unlockedActions' => ['index'],
]);
$this->loadComponent('Csrf');
$this->loadComponent('Flash');
}

}

You can configure components at runtime using the ``setConfig()`` method. Often,
Expand All @@ -58,7 +57,7 @@ to read and write configuration data::
$this->FormProtection->getConfig('unlockedActions');

// Set config
$this->Csrf->setConfig('cookieName', 'token');
$this->Flash->setConfig('key', 'myFlash');

As with helpers, components will automatically merge their ``$_defaultConfig``
property with constructor configuration to create the ``$_config`` property
Expand Down Expand Up @@ -193,12 +192,12 @@ component, through which we can access an instance of it::

// In a controller
// Make the new component available at $this->Math,
// as well as the standard $this->Csrf
// as well as the standard $this->Flash
public function initialize(): void
{
parent::initialize();
$this->loadComponent('Math');
$this->loadComponent('Csrf');
$this->loadComponent('Flash');
}

When including Components in a Controller you can also declare a
Expand All @@ -214,7 +213,7 @@ the Component::
'precision' => 2,
'randomGenerator' => 'srand',
]);
$this->loadComponent('Csrf');
$this->loadComponent('Flash');
}

The above would pass the array containing precision and randomGenerator to
Expand Down
2 changes: 1 addition & 1 deletion en/intro/cakephp-folder-structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ View

.. note::

The folder ``Shell`` is not present by default.
The folder ``Command`` is not present by default.
You can add it when you need it.

.. meta::
Expand Down
8 changes: 5 additions & 3 deletions en/intro/conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,13 @@ creating classes and files that you'd need to create anyway.
+------------+-----------------------------+-------------------------+------------------------------------------------------+
| Controller | ArticlesController | MenuLinksController | Plural, CamelCased, end in Controller |
+------------+-----------------------------+-------------------------+------------------------------------------------------+
| Templates | Articles/index.php | MenuLinks/index.php | View template files are named after |
| | Articles/add.php | MenuLinks/add.php | the controller functions they |
| | Articles/get_list.php | MenuLinks/get_list.php | display, in an underscored form |
+------------+-----------------------------+-------------------------+------------------------------------------------------+
| Behavior | ArticlesBehavior.php | MenuLinksBehavior.php | |
+------------+-----------------------------+-------------------------+------------------------------------------------------+
| View | ArticlesView.php | MenuLinksView.php | View template files are named after |
| | | | the controller functions they |
| | | | display, in an underscored form |
| View | ArticlesView.php | MenuLinksView.php | |
+------------+-----------------------------+-------------------------+------------------------------------------------------+
| Helper | ArticlesHelper.php | MenuLinksHelper.php | |
+------------+-----------------------------+-------------------------+------------------------------------------------------+
Expand Down
4 changes: 2 additions & 2 deletions en/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ appropriate parts of your application. The hooks are:
* ``services`` Used to register application container services

By default all plugins hooks are enabled. You can disable hooks by using the
related options of the ``plugin load`` command::
related options of the ``plugin load`` command:

.. code-block:: console
Expand Down Expand Up @@ -195,7 +195,7 @@ You can reference a plugin's controllers, models, components, behaviors, and
helpers by prefixing the name of the plugin.

For example, say you wanted to use the ContactManager plugin's
ContactInfoHelper to output formatted contact information in
``ContactInfoHelper`` to output formatted contact information in
one of your views. In your controller, using ``addHelper()``
could look like this::

Expand Down
7 changes: 5 additions & 2 deletions en/views/json-and-xml-views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ serialize::

public function index()
{
// Set the view vars that have to be serialized.
// Set the view vars
$this->set('articles', $this->paginate());
// Specify which view vars JsonView should serialize.
$this->viewBuilder()->setOption('serialize', 'articles');
Expand All @@ -84,7 +84,7 @@ You can also define ``serialize`` as an array of view variables to combine::
{
// Some code that created $articles and $comments

// Set the view vars that have to be serialized.
// Set the view vars
$this->set(compact('articles', 'comments'));

// Specify which view vars JsonView should serialize.
Expand Down Expand Up @@ -238,3 +238,6 @@ total control over view class selection you can directly choose the view class::
}
}

.. meta::
:title lang=en: JSON and XML views
:keywords lang=en: json,xml,presentation layer,view,ajax,logic,syntax,templates,cakephp
25 changes: 21 additions & 4 deletions es/appendices.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
Apéndices
#########

En los apéndices encontrarás información relacionada a las nuevas características
En los apéndices encontrarás información relacionada con las nuevas características
introducidas en cada versión, así como también las guías de migración entre versiones.

Guía de Migración a 4.x
Guía de Migración a 5.x
=======================

.. toctree::
:maxdepth: 1

appendices/4-0-migration-guide
appendices/5-0-upgrade-guide
appendices/5-0-migration-guide

Información General
Retrocompatiblidad
===================

Si quieres utilizar funcionalidades de 3.x o 4.x o ir migrando poco a poco
el `Plugin Shim <https://github.com/dereuromark/cakephp-shim>`__ puede ayudarte a mitigar algunos
de los cambios que rompen la compatibilidad.

Antecompatiblidad
=================

La Antecompatibilidad puede preparar tu aplicación 4.x para la próxima versión 5.x.

Si quieres utilizar una funcionalidad de 5.x en 4.x, revisa el `Plugin Shim
<https://github.com/dereuromark/cakephp-shim>`__. Este plugin te ayuda a mitigar los
problemas de compatibilidad y a llevar funcionalidades de 5.x a 4.x.

General Information
===================

.. toctree::
Expand Down
15 changes: 0 additions & 15 deletions es/appendices/4-0-migration-guide.rst

This file was deleted.

Loading

0 comments on commit d791f5c

Please sign in to comment.