@@ -113,10 +113,16 @@ To inspect all messages in the ``fr`` locale for the AcmeDemoBundle, run:
113
113
114
114
$ php app/console debug:translation fr AcmeDemoBundle
115
115
116
- You will get this output:
116
+ +----------+-------------------+----------------------+-------------------------------+
117
+ | State(s) | Id | Message Preview (fr) | Fallback Message Preview (en) |
118
+ +----------+-------------------+----------------------+-------------------------------+
119
+ | o | Symfony2 is great | J'aime Symfony2 | Symfony2 is great |
120
+ +----------+-------------------+----------------------+-------------------------------+
117
121
118
- .. image :: /_images/translation/debug_1.png
119
- :align: center
122
+ Legend:
123
+ x Missing message
124
+ o Unused message
125
+ = Same as the fallback message
120
126
121
127
It shows you a table with the result when translating the message in the ``fr ``
122
128
locale and the result when the fallback locale ``en `` would be used. On top
@@ -128,17 +134,41 @@ because it is translated, but you haven't used it anywhere yet.
128
134
Now, if you translate the message in one of your templates, you will get this
129
135
output:
130
136
131
- .. image :: /_images/translation/debug_2.png
132
- :align: center
137
+ .. code-block :: terminal
138
+
139
+ $ php app/console debug:translation fr AcmeDemoBundle
140
+
141
+ +----------+-------------------+----------------------+-------------------------------+
142
+ | State(s) | Id | Message Preview (fr) | Fallback Message Preview (en) |
143
+ +----------+-------------------+----------------------+-------------------------------+
144
+ | | Symfony2 is great | J'aime Symfony2 | Symfony2 is great |
145
+ +----------+-------------------+----------------------+-------------------------------+
146
+
147
+ Legend:
148
+ x Missing message
149
+ o Unused message
150
+ = Same as the fallback message
133
151
134
152
The state is empty which means the message is translated in the ``fr `` locale
135
153
and used in one or more templates.
136
154
137
155
If you delete the message ``Symfony is great `` from your translation file
138
156
for the ``fr `` locale and run the command, you will get:
139
157
140
- .. image :: /_images/translation/debug_3.png
141
- :align: center
158
+ .. code-block :: terminal
159
+
160
+ $ php app/console debug:translation fr AcmeDemoBundle
161
+
162
+ +----------+-------------------+----------------------+-------------------------------+
163
+ | State(s) | Id | Message Preview (fr) | Fallback Message Preview (en) |
164
+ +----------+-------------------+----------------------+-------------------------------+
165
+ | x = | Symfony2 is great | J'aime Symfony2 | Symfony2 is great |
166
+ +----------+-------------------+----------------------+-------------------------------+
167
+
168
+ Legend:
169
+ x Missing message
170
+ o Unused message
171
+ = Same as the fallback message
142
172
143
173
The state indicates the message is missing because it is not translated in
144
174
the ``fr `` locale but it is still used in the template. Moreover, the message
@@ -149,8 +179,20 @@ the ``en`` locale.
149
179
If you copy the content of the translation file in the ``en `` locale, to the
150
180
translation file in the ``fr `` locale and run the command, you will get:
151
181
152
- .. image :: /_images/translation/debug_4.png
153
- :align: center
182
+ .. code-block :: terminal
183
+
184
+ $ php app/console debug:translation fr AcmeDemoBundle
185
+
186
+ +----------+-------------------+----------------------+-------------------------------+
187
+ | State(s) | Id | Message Preview (fr) | Fallback Message Preview (en) |
188
+ +----------+-------------------+----------------------+-------------------------------+
189
+ | = | Symfony2 is great | J'aime Symfony2 | Symfony2 is great |
190
+ +----------+-------------------+----------------------+-------------------------------+
191
+
192
+ Legend:
193
+ x Missing message
194
+ o Unused message
195
+ = Same as the fallback message
154
196
155
197
You can see that the translations of the message are identical in the ``fr ``
156
198
and ``en `` locales which means this message was probably copied from French
0 commit comments