Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba09b10

Browse files
committed
minor symfony#10384 Update debug.rst (DVishin)
This PR was submitted for the 4.1 branch but it was merged into the 2.8 branch instead (closes symfony#10384). Discussion ---------- Update debug.rst Using FR message bug was fixed and console output was formatted with new symfony messages support Commits ------- 25b4f2b Update debug.rst
2 parents 958735c + 25b4f2b commit ba09b10

File tree

1 file changed

+20
-40
lines changed

1 file changed

+20
-40
lines changed

translation/debug.rst

Lines changed: 20 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,11 @@ To inspect all messages in the ``fr`` locale for the AcmeDemoBundle, run:
113113
114114
$ php app/console debug:translation fr AcmeDemoBundle
115115
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-
+----------+-------------------+----------------------+-------------------------------+
121-
122-
Legend:
123-
x Missing message
124-
o Unused message
125-
= Same as the fallback message
116+
--------- ------------------ ---------------------- -------------------------------
117+
State Id Message Preview (fr) Fallback Message Preview (en)
118+
--------- ------------------ ---------------------- -------------------------------
119+
unused Symfony is great J'aime Symfony Symfony is great
120+
--------- ------------------ ---------------------- -------------------------------
126121
127122
It shows you a table with the result when translating the message in the ``fr``
128123
locale and the result when the fallback locale ``en`` would be used. On top
@@ -138,16 +133,11 @@ output:
138133
139134
$ php app/console debug:translation fr AcmeDemoBundle
140135
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
136+
--------- ------------------ ---------------------- -------------------------------
137+
State Id Message Preview (fr) Fallback Message Preview (en)
138+
--------- ------------------ ---------------------- -------------------------------
139+
Symfony is great J'aime Symfony Symfony is great
140+
--------- ------------------ ---------------------- -------------------------------
151141
152142
The state is empty which means the message is translated in the ``fr`` locale
153143
and used in one or more templates.
@@ -159,16 +149,11 @@ for the ``fr`` locale and run the command, you will get:
159149
160150
$ php app/console debug:translation fr AcmeDemoBundle
161151
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
152+
--------- ------------------ ---------------------- -------------------------------
153+
State Id Message Preview (fr) Fallback Message Preview (en)
154+
--------- ------------------ ---------------------- -------------------------------
155+
missing Symfony is great J'aime Symfony Symfony is great
156+
--------- ------------------ ---------------------- -------------------------------
172157
173158
The state indicates the message is missing because it is not translated in
174159
the ``fr`` locale but it is still used in the template. Moreover, the message
@@ -183,16 +168,11 @@ translation file in the ``fr`` locale and run the command, you will get:
183168
184169
$ php app/console debug:translation fr AcmeDemoBundle
185170
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
171+
---------- ------------------ ---------------------- -------------------------------
172+
State Id Message Preview (fr) Fallback Message Preview (en)
173+
---------- ------------------ ---------------------- -------------------------------
174+
fallback Symfony is great J'aime Symfony Symfony is great
175+
---------- ------------------ ---------------------- -------------------------------
196176
197177
You can see that the translations of the message are identical in the ``fr``
198178
and ``en`` locales which means this message was probably copied from French

0 commit comments

Comments
 (0)