Skip to content

Commit f4c9536

Browse files
committed
Merge branch '2.2' into 2.3
Conflicts: cookbook/configuration/environments.rst reference/forms/types/locale.rst
2 parents 5c62d5d + 3d5ecb3 commit f4c9536

38 files changed

+149
-134
lines changed

book/http_cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ The resulting HTTP header will look like this:
474474

475475
Note that in HTTP versions before 1.1 the origin server wasn't required to
476476
send the ``Date`` header. Consequently the cache (e.g. the browser) might
477-
need to rely onto his local clock to evaluate the ``Expires`` header making
477+
need to rely on the local clock to evaluate the ``Expires`` header making
478478
the lifetime calculation vulnerable to clock skew. Another limitation
479479
of the ``Expires`` header is that the specification states that "HTTP/1.1
480480
servers should not send ``Expires`` dates more than one year in the future."

book/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ file:
341341
342342
Now, the vendor directory won't be committed to source control. This is fine
343343
(actually, it's great!) because when someone else clones or checks out the
344-
project, he/she can simply run the ``php composer.phar install`` script to
344+
project, they can simply run the ``php composer.phar install`` script to
345345
install all the necessary project dependencies.
346346

347347
.. _`enable ACL support`: https://help.ubuntu.com/community/FilePermissionsACLs

book/security.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Security
55
========
66

77
Security is a two-step process whose goal is to prevent a user from accessing
8-
a resource that he/she should not have access to.
8+
a resource that they should not have access to.
99

1010
In the first step of the process, the security system identifies who the user
1111
is by requiring the user to submit some sort of identification. This is called
@@ -165,7 +165,7 @@ Firewalls (Authentication)
165165

166166
When a user makes a request to a URL that's protected by a firewall, the
167167
security system is activated. The job of the firewall is to determine whether
168-
or not the user needs to be authenticated, and if he does, to send a response
168+
or not the user needs to be authenticated, and if they do, to send a response
169169
back to the user initiating the authentication process.
170170

171171
A firewall is activated when the URL of an incoming request matches the configured
@@ -217,7 +217,7 @@ If the credentials are valid, the original request can be re-tried.
217217
:align: center
218218

219219
In this example, the user ``ryan`` successfully authenticates with the firewall.
220-
But since ``ryan`` doesn't have the ``ROLE_ADMIN`` role, he's still denied
220+
But since ``ryan`` doesn't have the ``ROLE_ADMIN`` role, they're still denied
221221
access to ``/admin/foo``. Ultimately, this means that the user will see some
222222
sort of message indicating that access has been denied.
223223

@@ -1045,7 +1045,7 @@ Access Control Lists (ACLs): Securing Individual Database Objects
10451045
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10461046

10471047
Imagine you are designing a blog system where your users can comment on your
1048-
posts. Now, you want a user to be able to edit his own comments, but not
1048+
posts. Now, you want a user to be able to edit their own comments, but not
10491049
those of other users. Also, as the admin user, you yourself want to be able
10501050
to edit *all* comments.
10511051

@@ -1807,7 +1807,7 @@ a route so that you can use it to generate the URL:
18071807
As of Symfony 2.1, you *must* have a route that corresponds to your logout
18081808
path. Without this route, logging out will not work.
18091809

1810-
Once the user has been logged out, he will be redirected to whatever path
1810+
Once the user has been logged out, they will be redirected to whatever path
18111811
is defined by the ``target`` parameter above (e.g. the ``homepage``). For
18121812
more information on configuring the logout, see the
18131813
:doc:`Security Configuration Reference </reference/configuration/security>`.

book/templating.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ this classic example:
13621362

13631363
Hello <?php echo $name ?>
13641364

1365-
Imagine that the user enters the following code as his/her name:
1365+
Imagine the user enters the following code for their name:
13661366

13671367
.. code-block:: text
13681368

book/translation.rst

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ into the language of the user::
2222

2323
The term *locale* refers roughly to the user's language and country. It
2424
can be any string that your application uses to manage translations and
25-
other format differences (e.g. currency format). The `ISO639-1`_
26-
*language* code, an underscore (``_``), then the `ISO3166 Alpha-2`_
25+
other format differences (e.g. currency format). The `ISO 639-1`_
26+
*language* code, an underscore (``_``), then the `ISO 3166-1 alpha-2`_
2727
*country* code (e.g. ``fr_FR`` for French/France) is recommended.
2828

2929
In this chapter, you'll learn how to use the Translation component in the
@@ -41,7 +41,8 @@ to learn even more. Overall, the process has several steps:
4141
for each supported locale that translate each message in the application;
4242

4343
#. Determine, :ref:`set and manage the user's locale <book-translation-user-locale>`
44-
for the request and optionally on the user's entire session.
44+
for the request and optionally
45+
:doc:`on the user's entire session </cookbook/session/locale_sticky_session>`.
4546

4647
.. _book-translation-configuration:
4748

@@ -147,11 +148,12 @@ different formats, XLIFF being the recommended format:
147148
# messages.fr.yml
148149
Symfony2 is great: J'aime Symfony2
149150
150-
For information on where these files should be located, see :ref:`book-translation-resource-locations`.
151+
For information on where these files should be located, see
152+
:ref:`book-translation-resource-locations`.
151153

152154
Now, if the language of the user's locale is French (e.g. ``fr_FR`` or ``fr_BE``),
153155
the message will be translated into ``J'aime Symfony2``. You can also translate
154-
message inside your :ref:`templates <book-translation-tags>`.
156+
the message inside your :ref:`templates <book-translation-tags>`.
155157

156158
The Translation Process
157159
~~~~~~~~~~~~~~~~~~~~~~~
@@ -278,8 +280,8 @@ texts* and complex expressions:
278280
Using the translation tags or filters have the same effect, but with
279281
one subtle difference: automatic output escaping is only applied to
280282
translations using a filter. In other words, if you need to be sure
281-
that your translated is *not* output escaped, you must apply the
282-
``raw`` filter after the translation filter:
283+
that your translated message is *not* output escaped, you must apply
284+
the ``raw`` filter after the translation filter:
283285

284286
.. code-block:: jinja
285287
@@ -290,7 +292,7 @@ texts* and complex expressions:
290292
291293
{% set message = '<h3>foo</h3>' %}
292294
293-
{# strings and variables translated via a filter is escaped by default #}
295+
{# strings and variables translated via a filter are escaped by default #}
294296
{{ message|trans|raw }}
295297
{{ '<h3>bar</h3>'|trans|raw }}
296298
@@ -303,7 +305,7 @@ texts* and complex expressions:
303305
{% trans_default_domain "app" %}
304306
305307
Note that this only influences the current template, not any "included"
306-
templates (in order to avoid side effects).
308+
template (in order to avoid side effects).
307309

308310
.. versionadded:: 2.1
309311
The ``trans_default_domain`` tag is new in Symfony 2.1
@@ -349,7 +351,7 @@ The filename of the translation files is also important: each message file
349351
must be named according to the following path: ``domain.locale.loader``:
350352

351353
* **domain**: An optional way to organize messages into groups (e.g. ``admin``,
352-
``navigation`` or the default ``messages``) - see ":ref:`using-message-domains`";
354+
``navigation`` or the default ``messages``) - see :ref:`using-message-domains`;
353355

354356
* **locale**: The locale that the translations are for (e.g. ``en_GB``, ``en``, etc);
355357

@@ -377,7 +379,7 @@ taste. For more options, see :ref:`component-translator-message-catalogs`.
377379

378380
Each time you create a *new* translation resource (or install a bundle
379381
that includes a translation resource), be sure to clear your cache so
380-
that Symfony can discover the new translation resource:
382+
that Symfony can discover the new translation resources:
381383

382384
.. code-block:: bash
383385
@@ -484,11 +486,13 @@ by the routing system using the special ``_locale`` parameter:
484486
return $collection;
485487
486488
When using the special ``_locale`` parameter in a route, the matched locale
487-
will *automatically be set on the user's session*. In other words, if a user
489+
will *automatically be set on the Request* and can be retrieved via the
490+
:method:`Symfony\\Component\\HttpFoundation\\Request::getLocale` method.
491+
In other words, if a user
488492
visits the URI ``/fr/contact``, the locale ``fr`` will automatically be set
489-
as the locale for the user's session.
493+
as the locale for the current request.
490494

491-
You can now use the user's locale to create routes to other translated pages
495+
You can now use the locale to create routes to other translated pages
492496
in your application.
493497

494498
Setting a Default Locale
@@ -659,7 +663,7 @@ steps:
659663
* Abstract messages in your application by wrapping each in either the
660664
:method:`Symfony\\Component\\Translation\\Translator::trans` or
661665
:method:`Symfony\\Component\\Translation\\Translator::transChoice` methods
662-
(learn about this in ":doc:`/components/translation/usage`");
666+
(learn about this in :doc:`/components/translation/usage`);
663667

664668
* Translate each message into multiple locales by creating translation message
665669
files. Symfony2 discovers and processes each file because its name follows
@@ -669,6 +673,6 @@ steps:
669673
be set on the user's session.
670674

671675
.. _`i18n`: http://en.wikipedia.org/wiki/Internationalization_and_localization
672-
.. _`ISO3166 Alpha-2`: http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
673-
.. _`ISO639-1`: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
676+
.. _`ISO 3166-1 alpha-2`: http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
677+
.. _`ISO 639-1`: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
674678
.. _`Translatable Extension`: https://github.com/l3pp4rd/DoctrineExtensions

book/validation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ on that class. To do this, you can organize each constraint into one or more
692692
constraints.
693693

694694
For example, suppose you have a ``User`` class, which is used both when a
695-
user registers and when a user updates his/her contact information later:
695+
user registers and when a user updates their contact information later:
696696

697697
.. configuration-block::
698698

components/console/helpers/dialoghelper.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ if you want to know a bundle name, you can add this to your command::
4949
'AcmeDemoBundle'
5050
);
5151

52-
The user will be asked "Please enter the name of the bundle". She can type
53-
some name which will be returned by the ``ask`` method. If she leaves it empty,
52+
The user will be asked "Please enter the name of the bundle". They can type
53+
some name which will be returned by the ``ask`` method. If they leave it empty,
5454
the default value (``AcmeDemoBundle`` here) is returned.
5555

5656
Autocompletion
@@ -138,8 +138,8 @@ function should also return the value of the user's input if the validation was
138138
You can set the max number of times to ask in the ``$attempts`` argument.
139139
If you reach this max number it will use the default value, which is given
140140
in the last argument. Using ``false`` means the amount of attempts is infinite.
141-
The user will be asked as long as he provides an invalid answer and will only
142-
be able to proceed if her input is valid.
141+
The user will be asked as long as they provide an invalid answer and will only
142+
be able to proceed if their input is valid.
143143

144144
Validating a Hidden Response
145145
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -202,7 +202,7 @@ The option which should be selected by default is provided with the fourth
202202
argument. The default is ``null``, which means that no option is the default one.
203203

204204
If the user enters an invalid string, an error message is shown and the user
205-
is asked to provide the answer another time, until she enters a valid string
205+
is asked to provide the answer another time, until they enter a valid string
206206
or the maximum attempts is reached (which you can define in the fifth
207207
argument). The default value for the attempts is ``false``, which means infinite
208208
attempts. You can define your own error message in the sixth argument.

components/event_dispatcher/container_aware_dispatcher.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
single: EventDispatcher; Service container aware
33

44
The Container Aware Event Dispatcher
5-
===================================
5+
====================================
66

77
Introduction
88
------------

components/event_dispatcher/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Introduction
1111
Objected Oriented code has gone a long way to ensuring code extensibility. By
1212
creating classes that have well defined responsibilities, your code becomes
1313
more flexible and a developer can extend them with subclasses to modify their
14-
behaviors. But if he wants to share his changes with other developers who have
14+
behaviors. But if they want to share the changes with other developers who have
1515
also made their own subclasses, code inheritance is no longer the answer.
1616

1717
Consider the real-world example where you want to provide a plugin system for

components/form/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ method:
487487

488488
.. code-block:: php-standalone
489489
490-
use Symfony\HttpFoundation\Request;
490+
use Symfony\Component\HttpFoundation\Request;
491491
use Symfony\Component\HttpFoundation\RedirectResponse;
492492
493493
$form = $formFactory->createBuilder()

0 commit comments

Comments
 (0)