Skip to content

Commit 2b027a9

Browse files
committedOct 6, 2016
Merge branch '3.1'
Conflicts: reference/configuration/framework.rst
2 parents c5328d7 + 4240817 commit 2b027a9

File tree

20 files changed

+102
-66
lines changed

20 files changed

+102
-66
lines changed
 

‎best_practices/business-logic.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Inside here, you can create whatever directories you want to organize things:
1515

1616
.. code-block:: text
1717
18-
symfony2-project/
18+
symfony-project/
1919
├─ app/
2020
├─ src/
2121
│ └─ AppBundle/
@@ -35,7 +35,7 @@ and put things there:
3535

3636
.. code-block:: text
3737
38-
symfony2-project/
38+
symfony-project/
3939
├─ app/
4040
├─ src/
4141
│ ├─ Acme/
@@ -180,7 +180,7 @@ The three entities defined by our sample blog application are a good example:
180180

181181
.. code-block:: text
182182
183-
symfony2-project/
183+
symfony-project/
184184
├─ ...
185185
└─ src/
186186
└─ AppBundle/

‎best_practices/controllers.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ it more difficult to know which template is being rendered. It also makes
8585
it less obvious to beginners that a controller should always return a Response
8686
object (unless you're using a view layer).
8787

88-
How the Controller Looks
89-
------------------------
88+
What does the Controller look like
89+
----------------------------------
9090

91-
Considering all this, here is an example of how the controller should look
91+
Considering all this, here is an example of what the controller should look like
9292
for the homepage of our app:
9393

9494
.. code-block:: php

‎components/cache/cache_pools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ is ``getItem($key)``, which returns the cache item identified by the given key::
169169

170170
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
171171

172-
$cache = new FilesystemAdapter('app.cache')
172+
$cache = new FilesystemAdapter('app.cache');
173173
$latestNews = $cache->getItem('latest_news');
174174

175175
If no item is defined for the given key, the method doesn't return a ``null``

‎components/expression_language.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ How can the Expression Engine Help Me?
2121
--------------------------------------
2222

2323
The purpose of the component is to allow users to use expressions inside
24-
configuration for more complex logic. For some examples, the Symfony2 Framework
24+
configuration for more complex logic. For some examples, the Symfony Framework
2525
uses expressions in security, for validation rules and in route matching.
2626

2727
Besides using the component in the framework itself, the ExpressionLanguage

‎components/filesystem.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ On POSIX filesystems, directories are created with a default mode value
6060
You can pass an array or any :phpclass:`Traversable` object as the first
6161
argument.
6262

63+
.. note::
64+
65+
This function ignores already existing directories.
66+
6367
exists
6468
~~~~~~
6569

‎components/yaml/yaml_format.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ YAML uses the ISO-8601 standard to express dates:
158158

159159
.. code-block:: yaml
160160
161-
2001-12-14t21:59:43.10-05:00
161+
2001-12-14T21:59:43.10-05:00
162162
163163
.. code-block:: yaml
164164

‎configuration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ There are *two* ways to know *what* keys you can configure:
112112

113113
#. Use the :doc:`Reference Section </reference/index>`;
114114

115-
#. Use the ``config:dump`` command;
115+
#. Use the ``config:dump-reference`` command.
116116

117117
For example, if you want to configure something in Twig, you can see an example
118118
dump of all available configuration options by running:
119119

120120
.. code-block:: terminal
121121
122-
$ php bin/console config:dump twig
122+
$ php bin/console config:dump-reference twig
123123
124124
.. index::
125125
single: Environments; Introduction
@@ -183,7 +183,7 @@ can also load XML files or PHP files.
183183

184184
.. _config-parameter-intro:
185185

186-
The parameters key: Parameters (Variables)
186+
The parameters Key: Parameters (Variables)
187187
------------------------------------------
188188

189189
Another special key is called ``parameters``: it's used to define *variables* that

‎configuration/micro_kernel_trait.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ to hold the kernel. Now it looks like this::
199199
// optional, to use the standard Symfony cache directory
200200
public function getCacheDir()
201201
{
202-
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
202+
return __DIR__.'/../var/cache/'.$this->getEnvironment();
203203
}
204204

205205
// optional, to use the standard Symfony logs directory
206206
public function getLogDir()
207207
{
208-
return dirname(__DIR__).'/var/logs';
208+
return __DIR__.'/../var/logs';
209209
}
210210
}
211211

‎controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ object. To get it in your controller, just add it as an argument and
320320

321321
use Symfony\Component\HttpFoundation\Request;
322322

323-
public function indexAction($firstName, $lastName, Request $request)
323+
public function indexAction(Request $request, $firstName, $lastName)
324324
{
325325
$page = $request->query->get('page', 1);
326326

‎form/form_dependencies.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Next, register this as a service and tag it with ``form.type``:
101101
services:
102102
app.form.type.task:
103103
class: AppBundle\Form\TaskType
104+
arguments: ['@doctrine.orm.entity_manager']
104105
tags:
105106
- { name: form.type }
106107
@@ -114,6 +115,7 @@ Next, register this as a service and tag it with ``form.type``:
114115
115116
<services>
116117
<service id="app.form.type.task" class="AppBundle\Form\TaskType">
118+
<argument type="service" id="doctrine.orm.entity_manager"/>
117119
<tag name="form.type" />
118120
</service>
119121
</services>
@@ -127,6 +129,7 @@ Next, register this as a service and tag it with ``form.type``:
127129
'app.form.type.task',
128130
'AppBundle\Form\TaskType'
129131
)
132+
->addArgument('@doctrine.orm.entity_manager')
130133
->addTag('form.type')
131134
;
132135

‎page_creation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ to creating a page?
8686
#. *Create a controller*: The method below the route - ``numberAction()`` - is called
8787
the *controller*: this is a function where *you* build the page and ultimately
8888
return a ``Response`` object. You'll learn more about :doc:`controllers </controller>`
89-
in their own section, including how to return JSON responses;
89+
in their own section, including how to return JSON responses.
9090

9191
The Web Debug Toolbar: Debugging Dream
9292
--------------------------------------
@@ -134,7 +134,7 @@ variable so we can render that::
134134
$number = mt_rand(0, 100);
135135

136136
return $this->render('lucky/number.html.twig', array(
137-
'number' => $number
137+
'number' => $number,
138138
));
139139
}
140140
}
@@ -184,7 +184,7 @@ So what about the other directories in the project?
184184

185185
``var/``
186186
This is where automatically-created files are stored, like cache files
187-
(``var/cache/``) and logs (``var/logs/``).
187+
(``var/cache/``), logs (``var/logs/``) and sessions (``var/sessions/``).
188188

189189
``vendor/``
190190
Third-party (i.e. "vendor") libraries live here! These are downloaded via the `Composer`_

‎reference/configuration/framework.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Configuration
100100
* :ref:`enabled <reference-serializer-enabled>`
101101
* :ref:`cache <reference-serializer-cache>`
102102
* :ref:`enable_annotations <reference-serializer-enable_annotations>`
103-
* `name_converter`_
103+
* :ref:`name_converter <reference-serializer-name_converter>`
104104
* `php_errors`_
105105
* `log`_
106106
* `throw`_
@@ -1418,11 +1418,16 @@ If this option is enabled, serialization groups can be defined using annotations
14181418

14191419
For more information, see :ref:`serializer-using-serialization-groups-annotations`.
14201420

1421+
.. _reference-serializer-name_converter:
1422+
14211423
name_converter
14221424
..............
14231425

14241426
**type**: ``string``
14251427

1428+
.. versionadded:: 2.8
1429+
The ``name_converter`` option was introduced in Symfony 2.8.
1430+
14261431
The name converter to use.
14271432
The :class:`Symfony\\Component\\Serializer\\NameConverter\\CamelCaseToSnakeCaseNameConverter`
14281433
name converter can enabled by using the ``serializer.name_converter.camel_case_to_snake_case``

‎reference/constraints/UniqueEntity.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,18 @@ message
132132

133133
**type**: ``string`` **default**: ``This value is already used.``
134134

135-
The message that's displayed when this constraint fails.
135+
The message that's displayed when this constraint fails. This message is always
136+
mapped to the first field causing the violation, even when using multiple fields
137+
in the constraint.
138+
139+
.. versionadded:: 3.1
140+
The ability to include the invalid value into the message was introduced
141+
in Symfony 3.1.
142+
143+
Messages can include the ``{{ value }}`` placeholder to display a string
144+
representation of the invalid entity. If the entity doesn't define the
145+
``__toString()`` method, the following generic value will be used: *"Object of
146+
class __CLASS__ identified by <comma separated IDs>"*
136147

137148
em
138149
~~

‎routing.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Thanks to these two routes:
120120

121121
* If the user goes to ``/blog/*``, the second route is matched and ``showAction()``
122122
is executed. Because the route path is ``/blog/{slug}``, a ``$slug`` variable is
123-
passed to ``showAction`` matching that value. For example, if the user goes to
123+
passed to ``showAction()`` matching that value. For example, if the user goes to
124124
``/blog/yay-routing``, then ``$slug`` will equal ``yay-routing``.
125125

126126
Whenever you have a ``{placeholder}`` in your route path, that portion becomes a
@@ -363,7 +363,7 @@ With all of this in mind, check out this advanced example:
363363
{
364364
/**
365365
* @Route(
366-
* "/articles/{_locale}/{year}/{title}.{_format}",
366+
* "/articles/{_locale}/{year}/{slug}.{_format}",
367367
* defaults={"_format": "html"},
368368
* requirements={
369369
* "_locale": "en|fr",
@@ -372,7 +372,7 @@ With all of this in mind, check out this advanced example:
372372
* }
373373
* )
374374
*/
375-
public function showAction($_locale, $year, $title)
375+
public function showAction($_locale, $year, $slug)
376376
{
377377
}
378378
}
@@ -381,7 +381,7 @@ With all of this in mind, check out this advanced example:
381381
382382
# app/config/routing.yml
383383
article_show:
384-
path: /articles/{_locale}/{year}/{title}.{_format}
384+
path: /articles/{_locale}/{year}/{slug}.{_format}
385385
defaults: { _controller: AppBundle:Article:show, _format: html }
386386
requirements:
387387
_locale: en|fr
@@ -398,7 +398,7 @@ With all of this in mind, check out this advanced example:
398398
http://symfony.com/schema/routing/routing-1.0.xsd">
399399
400400
<route id="article_show"
401-
path="/articles/{_locale}/{year}/{title}.{_format}">
401+
path="/articles/{_locale}/{year}/{slug}.{_format}">
402402
403403
<default key="_controller">AppBundle:Article:show</default>
404404
<default key="_format">html</default>
@@ -418,7 +418,7 @@ With all of this in mind, check out this advanced example:
418418
$collection = new RouteCollection();
419419
$collection->add(
420420
'article_show',
421-
new Route('/articles/{_locale}/{year}/{title}.{_format}', array(
421+
new Route('/articles/{_locale}/{year}/{slug}.{_format}', array(
422422
'_controller' => 'AppBundle:Article:show',
423423
'_format' => 'html',
424424
), array(
@@ -509,11 +509,11 @@ The pattern has three parts, each separated by a colon:
509509

510510
For example, a ``_controller`` value of ``AppBundle:Blog:show`` means:
511511

512-
============= ================== ==============
512+
============= ================== ================
513513
Bundle Controller Class Method Name
514-
============= ================== ==============
515-
``AppBundle`` ``BlogController`` ``showAction``
516-
============= ================== ==============
514+
============= ================== ================
515+
``AppBundle`` ``BlogController`` ``showAction()``
516+
============= ================== ================
517517

518518
The controller might look like this::
519519

@@ -531,7 +531,7 @@ The controller might look like this::
531531
}
532532

533533
Notice that Symfony adds the string ``Controller`` to the class name (``Blog``
534-
=> ``BlogController``) and ``Action`` to the method name (``show`` => ``showAction``).
534+
=> ``BlogController``) and ``Action`` to the method name (``show`` => ``showAction()``).
535535

536536
You could also refer to this controller using its fully-qualified class name
537537
and method: ``AppBundle\Controller\BlogController::showAction``. But if you

‎serializer.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,12 @@ A service leveraging `APCu`_ (and APC for PHP < 5.5) is built-in.
225225
Enabling a Name Converter
226226
-------------------------
227227

228+
.. versionadded:: 2.8
229+
The ``name_converter`` option was introduced in Symfony 2.8.
230+
228231
The use of a :ref:`name converter <component-serializer-converting-property-names-when-serializing-and-deserializing>`
229-
service can be defined in the configuration using the ``name_converter``
230-
serializer parameter.
232+
service can be defined in the configuration using the :ref:`name_converter <reference-serializer-name_converter>`
233+
option.
231234

232235
The built-in :ref:`CamelCase to snake_case name converter <using-camelized-method-names-for-underscored-attributes>`
233236
can be enabled by using the ``serializer.name_converter.camel_case_to_snake_case``

‎service_container/service_decoration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ the original service is lost:
1818
# this replaces the old app.mailer definition with the new one, the
1919
# old definition is lost
2020
app.mailer:
21-
class AppBundle\DecoratingMailer
21+
class: AppBundle\DecoratingMailer
2222
2323
.. code-block:: xml
2424

‎setup.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ optional second argument of the ``new`` command:
9696
# use the most recent 'lts' version (Long Term Support version)
9797
$ symfony new my_project_name lts
9898
99+
Each version has its *own* documentation, which you can select on any documentation
100+
page.
101+
99102
.. note::
100103

101104
Read the :doc:`Symfony Release process </contributing/community/releases>`
@@ -294,7 +297,7 @@ Go Deeper with Setup
294297
.. _`Phar extension`: http://php.net/manual/en/intro.phar.php
295298
.. _`Symfony Standard Edition`: https://github.com/symfony/symfony-standard
296299
.. _`The Symfony Demo application`: https://github.com/symfony/symfony-demo
297-
.. _`The Symfony CMF Standard Edition`: https://github.com/symfony-cmf/symfony-cmf-standard
300+
.. _`The Symfony CMF Standard Edition`: https://github.com/symfony-cmf/standard-edition
298301
.. _`Symfony CMF`: http://cmf.symfony.com/
299302
.. _`The Symfony REST Edition`: https://github.com/gimler/symfony-rest-edition
300303
.. _`FOSRestBundle`: https://github.com/FriendsOfSymfony/FOSRestBundle

‎setup/bundles.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@ adding a ``setDefined()`` method. The recommended check in this case would be::
189189
// code for the new OptionsResolver API
190190
}
191191

192+
.. tip::
193+
194+
There is one case when you actually can rely on the
195+
``Symfony\Component\HttpKernel\Kernel::VERSION_ID`` constant: when trying
196+
to detect the version of the ``symfony/http-kernel`` component, because it
197+
is the component where this constant is defined.
198+
192199
.. _`symfony/phpunit-bridge package`: https://github.com/symfony/phpunit-bridge
193200
.. _`Official Symfony Guide to Upgrade from 2.x to 3.0`: https://github.com/symfony/symfony/blob/2.8/UPGRADE-3.0.md
194201
.. _`SensioLabs DeprecationDetector`: https://github.com/sensiolabs-de/deprecation-detector

‎templating.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,10 @@ Creating links to other pages in your application is one of the most common
571571
jobs for a template. Instead of hardcoding URLs in templates, use the ``path``
572572
Twig function (or the ``router`` helper in PHP) to generate URLs based on
573573
the routing configuration. Later, if you want to modify the URL of a particular
574-
page, all you'll need to do is change the routing configuration; the templates
574+
page, all you'll need to do is change the routing configuration: the templates
575575
will automatically generate the new URL.
576576

577-
First, link to the "_welcome" page, which is accessible via the following routing
577+
First, link to the "welcome" page, which is accessible via the following routing
578578
configuration:
579579

580580
.. configuration-block::
@@ -589,7 +589,7 @@ configuration:
589589
class WelcomeController extends Controller
590590
{
591591
/**
592-
* @Route("/", name="_welcome")
592+
* @Route("/", name="welcome")
593593
*/
594594
public function indexAction()
595595
{
@@ -600,7 +600,7 @@ configuration:
600600
.. code-block:: yaml
601601
602602
# app/config/routing.yml
603-
_welcome:
603+
welcome:
604604
path: /
605605
defaults: { _controller: AppBundle:Welcome:index }
606606
@@ -613,7 +613,7 @@ configuration:
613613
xsi:schemaLocation="http://symfony.com/schema/routing
614614
http://symfony.com/schema/routing/routing-1.0.xsd">
615615
616-
<route id="_welcome" path="/">
616+
<route id="welcome" path="/">
617617
<default key="_controller">AppBundle:Welcome:index</default>
618618
</route>
619619
</routes>
@@ -625,7 +625,7 @@ configuration:
625625
use Symfony\Component\Routing\RouteCollection;
626626
627627
$collection = new RouteCollection();
628-
$collection->add('_welcome', new Route('/', array(
628+
$collection->add('welcome', new Route('/', array(
629629
'_controller' => 'AppBundle:Welcome:index',
630630
)));
631631
@@ -637,11 +637,11 @@ To link to the page, just use the ``path`` Twig function and refer to the route:
637637

638638
.. code-block:: html+twig
639639

640-
<a href="{{ path('_welcome') }}">Home</a>
640+
<a href="{{ path('welcome') }}">Home</a>
641641

642642
.. code-block:: html+php
643643

644-
<a href="<?php echo $view['router']->path('_welcome') ?>">Home</a>
644+
<a href="<?php echo $view['router']->path('welcome') ?>">Home</a>
645645

646646
As expected, this will generate the URL ``/``. Now, for a more complicated
647647
route:
@@ -702,7 +702,7 @@ route:
702702
703703
In this case, you need to specify both the route name (``article_show``) and
704704
a value for the ``{slug}`` parameter. Using this route, revisit the
705-
``recent_list`` template from the previous section and link to the articles
705+
``recent_list.html.twig`` template from the previous section and link to the articles
706706
correctly:
707707

708708
.. configuration-block::
@@ -735,12 +735,12 @@ correctly:
735735

736736
.. code-block:: html+twig
737737

738-
<a href="{{ url('_welcome') }}">Home</a>
738+
<a href="{{ url('welcome') }}">Home</a>
739739

740740
.. code-block:: html+php
741741

742742
<a href="<?php echo $view['router']->url(
743-
'_welcome',
743+
'welcome',
744744
array()
745745
) ?>">Home</a>
746746

@@ -895,14 +895,14 @@ block of the base template.
895895

896896
You can also include assets located in your bundles' ``Resources/public`` folder.
897897
You will need to run the ``php bin/console assets:install target [--symlink]``
898-
command, which moves (or symlinks) files into the correct location. (target
898+
command, which copies (or symlinks) files into the correct location. (target
899899
is by default "web").
900900

901901
.. code-block:: html+twig
902902

903903
<link href="{{ asset('bundles/acmedemo/css/contact.css') }}" rel="stylesheet" />
904904

905-
The end result is a page that includes both the ``main.css`` and ``contact.css``
905+
The end result is a page that includes ``main.js`` and both the ``main.css`` and ``contact.css``
906906
stylesheets.
907907

908908
Referencing the Request, User or Session
@@ -924,7 +924,7 @@ Suppose ``description`` equals ``I <3 this product``:
924924
.. code-block:: twig
925925
926926
<!-- output escaping is on automatically -->
927-
{{ description }} <!-- I &lt3 this product -->
927+
{{ description }} <!-- I &lt;3 this product -->
928928
929929
<!-- disable output escaping with the raw filter -->
930930
{{ description|raw }} <!-- I <3 this product -->

‎translation/debug.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ tag or filter usages in Twig templates:
1515

1616
.. code-block:: jinja
1717
18-
{% trans %}Symfony2 is great{% endtrans %}
18+
{% trans %}Symfony is great{% endtrans %}
1919
20-
{{ 'Symfony2 is great'|trans }}
20+
{{ 'Symfony is great'|trans }}
2121
22-
{{ 'Symfony2 is great'|transchoice(1) }}
22+
{{ 'Symfony is great'|transchoice(1) }}
2323
24-
{% transchoice 1 %}Symfony2 is great{% endtranschoice %}
24+
{% transchoice 1 %}Symfony is great{% endtranschoice %}
2525
2626
It will also detect the following translator usages in PHP templates:
2727

2828
.. code-block:: php
2929
30-
$view['translator']->trans("Symfony2 is great");
30+
$view['translator']->trans("Symfony is great");
3131
32-
$view['translator']->transChoice('Symfony2 is great', 1);
32+
$view['translator']->transChoice('Symfony is great', 1);
3333
3434
.. caution::
3535

@@ -41,7 +41,7 @@ It will also detect the following translator usages in PHP templates:
4141

4242
.. code-block:: jinja
4343
44-
{% set message = 'Symfony2 is great' %}
44+
{% set message = 'Symfony is great' %}
4545
{{ message|trans }}
4646
4747
Suppose your application's default_locale is ``fr`` and you have configured
@@ -59,8 +59,8 @@ you've already setup some translations for the ``fr`` locale inside an AcmeDemoB
5959
<file source-language="en" datatype="plaintext" original="file.ext">
6060
<body>
6161
<trans-unit id="1">
62-
<source>Symfony2 is great</source>
63-
<target>J'aime Symfony2</target>
62+
<source>Symfony is great</source>
63+
<target>J'aime Symfony</target>
6464
</trans-unit>
6565
</body>
6666
</file>
@@ -70,13 +70,13 @@ you've already setup some translations for the ``fr`` locale inside an AcmeDemoB
7070
.. code-block:: yaml
7171
7272
# src/Acme/AcmeDemoBundle/Resources/translations/messages.fr.yml
73-
Symfony2 is great: J'aime Symfony2
73+
Symfony is great: J'aime Symfony
7474
7575
.. code-block:: php
7676
7777
// src/Acme/AcmeDemoBundle/Resources/translations/messages.fr.php
7878
return array(
79-
'Symfony2 is great' => 'J\'aime Symfony2',
79+
'Symfony is great' => 'J\'aime Symfony',
8080
);
8181
8282
and for the ``en`` locale:
@@ -91,8 +91,8 @@ and for the ``en`` locale:
9191
<file source-language="en" datatype="plaintext" original="file.ext">
9292
<body>
9393
<trans-unit id="1">
94-
<source>Symfony2 is great</source>
95-
<target>Symfony2 is great</target>
94+
<source>Symfony is great</source>
95+
<target>Symfony is great</target>
9696
</trans-unit>
9797
</body>
9898
</file>
@@ -101,13 +101,13 @@ and for the ``en`` locale:
101101
.. code-block:: yaml
102102
103103
# src/Acme/AcmeDemoBundle/Resources/translations/messages.en.yml
104-
Symfony2 is great: Symfony2 is great
104+
Symfony is great: Symfony is great
105105
106106
.. code-block:: php
107107
108108
// src/Acme/AcmeDemoBundle/Resources/translations/messages.en.php
109109
return array(
110-
'Symfony2 is great' => 'Symfony2 is great',
110+
'Symfony is great' => 'Symfony is great',
111111
);
112112
113113
To inspect all messages in the ``fr`` locale for the AcmeDemoBundle, run:
@@ -125,7 +125,7 @@ It shows you a table with the result when translating the message in the ``fr``
125125
locale and the result when the fallback locale ``en`` would be used. On top
126126
of that, it will also show you when the translation is the same as the fallback
127127
translation (this could indicate that the message was not correctly translated).
128-
Furthermore, it indicates that the message ``Symfony2 is great`` is unused
128+
Furthermore, it indicates that the message ``Symfony is great`` is unused
129129
because it is translated, but you haven't used it anywhere yet.
130130

131131
Now, if you translate the message in one of your templates, you will get this
@@ -137,7 +137,7 @@ output:
137137
The state is empty which means the message is translated in the ``fr`` locale
138138
and used in one or more templates.
139139

140-
If you delete the message ``Symfony2 is great`` from your translation file
140+
If you delete the message ``Symfony is great`` from your translation file
141141
for the ``fr`` locale and run the command, you will get:
142142

143143
.. image:: /_images/translation/debug_3.png

0 commit comments

Comments
 (0)
Please sign in to comment.