@@ -113,10 +113,16 @@ To inspect all messages in the ``fr`` locale for the AcmeDemoBundle, run:
113113
114114 $ php app/console debug:translation fr AcmeDemoBundle
115115
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+ +----------+-------------------+----------------------+-------------------------------+
117121
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
120126
121127 It shows you a table with the result when translating the message in the ``fr ``
122128locale 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.
128134Now, if you translate the message in one of your templates, you will get this
129135output:
130136
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
133151
134152 The state is empty which means the message is translated in the ``fr `` locale
135153and used in one or more templates.
136154
137155If you delete the message ``Symfony is great `` from your translation file
138156for the ``fr `` locale and run the command, you will get:
139157
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
142172
143173 The state indicates the message is missing because it is not translated in
144174the ``fr `` locale but it is still used in the template. Moreover, the message
@@ -149,8 +179,20 @@ the ``en`` locale.
149179If you copy the content of the translation file in the ``en `` locale, to the
150180translation file in the ``fr `` locale and run the command, you will get:
151181
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
154196
155197 You can see that the translations of the message are identical in the ``fr ``
156198and ``en `` locales which means this message was probably copied from French
0 commit comments