@@ -15,21 +15,21 @@ tag or filter usages in Twig templates:
15
15
16
16
.. code-block :: jinja
17
17
18
- {% trans %}Symfony2 is great{% endtrans %}
18
+ {% trans %}Symfony is great{% endtrans %}
19
19
20
- {{ 'Symfony2 is great'|trans }}
20
+ {{ 'Symfony is great'|trans }}
21
21
22
- {{ 'Symfony2 is great'|transchoice(1) }}
22
+ {{ 'Symfony is great'|transchoice(1) }}
23
23
24
- {% transchoice 1 %}Symfony2 is great{% endtranschoice %}
24
+ {% transchoice 1 %}Symfony is great{% endtranschoice %}
25
25
26
26
It will also detect the following translator usages in PHP templates:
27
27
28
28
.. code-block :: php
29
29
30
- $view['translator']->trans("Symfony2 is great");
30
+ $view['translator']->trans("Symfony is great");
31
31
32
- $view['translator']->transChoice('Symfony2 is great', 1);
32
+ $view['translator']->transChoice('Symfony is great', 1);
33
33
34
34
.. caution ::
35
35
@@ -41,7 +41,7 @@ It will also detect the following translator usages in PHP templates:
41
41
42
42
.. code-block :: jinja
43
43
44
- {% set message = 'Symfony2 is great' %}
44
+ {% set message = 'Symfony is great' %}
45
45
{{ message|trans }}
46
46
47
47
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
59
59
<file source-language =" en" datatype =" plaintext" original =" file.ext" >
60
60
<body >
61
61
<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 >
64
64
</trans-unit >
65
65
</body >
66
66
</file >
@@ -70,13 +70,13 @@ you've already setup some translations for the ``fr`` locale inside an AcmeDemoB
70
70
.. code-block :: yaml
71
71
72
72
# src/Acme/AcmeDemoBundle/Resources/translations/messages.fr.yml
73
- Symfony2 is great : J'aime Symfony2
73
+ Symfony is great : J'aime Symfony
74
74
75
75
.. code-block :: php
76
76
77
77
// src/Acme/AcmeDemoBundle/Resources/translations/messages.fr.php
78
78
return array(
79
- 'Symfony2 is great' => 'J\'aime Symfony2 ',
79
+ 'Symfony is great' => 'J\'aime Symfony ',
80
80
);
81
81
82
82
and for the ``en `` locale:
@@ -91,8 +91,8 @@ and for the ``en`` locale:
91
91
<file source-language =" en" datatype =" plaintext" original =" file.ext" >
92
92
<body >
93
93
<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 >
96
96
</trans-unit >
97
97
</body >
98
98
</file >
@@ -101,13 +101,13 @@ and for the ``en`` locale:
101
101
.. code-block :: yaml
102
102
103
103
# src/Acme/AcmeDemoBundle/Resources/translations/messages.en.yml
104
- Symfony2 is great : Symfony2 is great
104
+ Symfony is great : Symfony is great
105
105
106
106
.. code-block :: php
107
107
108
108
// src/Acme/AcmeDemoBundle/Resources/translations/messages.en.php
109
109
return array(
110
- 'Symfony2 is great' => 'Symfony2 is great',
110
+ 'Symfony is great' => 'Symfony is great',
111
111
);
112
112
113
113
To inspect all messages in the ``fr `` locale for the AcmeDemoBundle, run:
@@ -128,7 +128,7 @@ It shows you a table with the result when translating the message in the ``fr``
128
128
locale and the result when the fallback locale ``en `` would be used. On top
129
129
of that, it will also show you when the translation is the same as the fallback
130
130
translation (this could indicate that the message was not correctly translated).
131
- Furthermore, it indicates that the message ``Symfony2 is great `` is unused
131
+ Furthermore, it indicates that the message ``Symfony is great `` is unused
132
132
because it is translated, but you haven't used it anywhere yet.
133
133
134
134
Now, if you translate the message in one of your templates, you will get this
@@ -140,7 +140,7 @@ output:
140
140
The state is empty which means the message is translated in the ``fr `` locale
141
141
and used in one or more templates.
142
142
143
- If you delete the message ``Symfony2 is great `` from your translation file
143
+ If you delete the message ``Symfony is great `` from your translation file
144
144
for the ``fr `` locale and run the command, you will get:
145
145
146
146
.. image :: /_images/translation/debug_3.png
0 commit comments