8000 minor #10091 Image to console (javiereguiluz) · symfony/symfony-docs@c195250 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit c195250

Browse files
committed
minor #10091 Image to console (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #10091). Discussion ---------- Image to console Some of our images are screenshots of the console output ... let's turn them into real console outputs (except when formatting and colors are important ... e.g. in some advanced console screenshots). Commits ------- 881bd15 Image to console
2 parents a29603d + 881bd15 commit c195250

File tree

9 files changed

+78
-11
lines changed

9 files changed

+78
-11
lines changed

_images/components/console/table.png

-65.9 KB
Binary file not shown.
-46.6 KB
Binary file not shown.

_images/translation/debug_1.png

-22.2 KB
Binary file not shown.

_images/translation/debug_2.png

-22 KB
Binary file not shown.

_images/translation/debug_3.png

-21.9 KB
Binary file not shown.

_images/translation/debug_4.png

-21.7 KB
Binary file not shown.

components/console/helpers/tablehelper.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,16 @@ Table Helper
1616

1717
When building a console application it may be useful to display tabular data:
1818

19-
.. image:: /_images/components/console/table.png
19+
.. code-block:: terminal
20+
21+
+---------------+--------------------------+------------------+
22+
| ISBN | Title | Author |
23+
+---------------+--------------------------+------------------+
24+
| 99921-58-10-7 | Divine Comedy | Dante Alighieri |
25+
| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
26+
| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
27+
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
28+
+---------------+--------------------------+------------------+
2029
2130
To display a table, use the :class:`Symfony\\Component\\Console\\Helper\\TableHelper`,
2231
set headers, rows and render::

components/phpunit_bridge.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,23 @@ to provide more features:
6262
6363
After running your PHPUnit tests, you will get a report similar to this one:
6464

65-
.. image:: /_images/components/phpunit_bridge/report.png
65+
.. code-block:: terminal
66+
67+
$ phpunit -c app
68+
PHPUnit by Sebastian Bergmann.
69+
70+
Configuration read from <your-project>/app/phpunit.xml.dist
71+
.................
72+
73+
Time: 1.77 seconds, Memory: 5.75Mb
74+
75+
OK (17 tests, 21 assertions)
76+
77+
Remaining deprecation notices (2)
78+
79+
getEntityManager is deprecated since Symfony 2.1. Use getManager instead: 2x
80+
1x in DefaultControllerTest::testPublicUrls from AppBundle\Tests\Controller
81+
1x in BlogControllerTest::testIndex from AppBundle\Tests\Controller
6682
6783
The summary includes:
6884

translation/debug.rst

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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``
122128
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.
128134
Now, if you translate the message in one of your templates, you will get this
129135
output:
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
135153
and used in one or more templates.
136154

137155
If you delete the message ``Symfony is great`` from your translation file
138156
for 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
144174
the ``fr`` locale but it is still used in the template. Moreover, the message
@@ -149,8 +179,20 @@ the ``en`` locale.
149179
If you copy the content of the translation file in the ``en`` locale, to the
150180
translation 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``
156198
and ``en`` locales which means this message was probably copied from French

0 commit comments

Comments
 (0)
0