diff --git a/_images/components/console/table.png b/_images/components/console/table.png deleted file mode 100644 index ba1e3ae79b9..00000000000 Binary files a/_images/components/console/table.png and /dev/null differ diff --git a/_images/components/phpunit_bridge/report.png b/_images/components/phpunit_bridge/report.png deleted file mode 100644 index 3a4534c1383..00000000000 Binary files a/_images/components/phpunit_bridge/report.png and /dev/null differ diff --git a/_images/translation/debug_1.png b/_images/translation/debug_1.png deleted file mode 100644 index 8f175f4d7ff..00000000000 Binary files a/_images/translation/debug_1.png and /dev/null differ diff --git a/_images/translation/debug_2.png b/_images/translation/debug_2.png deleted file mode 100644 index 04a57fa41d4..00000000000 Binary files a/_images/translation/debug_2.png and /dev/null differ diff --git a/_images/translation/debug_3.png b/_images/translation/debug_3.png deleted file mode 100644 index 6ed595e097b..00000000000 Binary files a/_images/translation/debug_3.png and /dev/null differ diff --git a/_images/translation/debug_4.png b/_images/translation/debug_4.png deleted file mode 100644 index db642b1773f..00000000000 Binary files a/_images/translation/debug_4.png and /dev/null differ diff --git a/components/console/helpers/tablehelper.rst b/components/console/helpers/tablehelper.rst index cc853ebdad2..f7502dc09b8 100644 --- a/components/console/helpers/tablehelper.rst +++ b/components/console/helpers/tablehelper.rst @@ -16,7 +16,16 @@ Table Helper When building a console application it may be useful to display tabular data: -.. image:: /_images/components/console/table.png +.. code-block:: terminal + + +---------------+--------------------------+------------------+ + | ISBN | Title | Author | + +---------------+--------------------------+------------------+ + | 99921-58-10-7 | Divine Comedy | Dante Alighieri | + | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | + | 80-902734-1-6 | And Then There Were None | Agatha Christie | + +---------------+--------------------------+------------------+ To display a table, use the :class:`Symfony\\Component\\Console\\Helper\\TableHelper`, set headers, rows and render:: diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 1b49f7bf0de..2fb224bbf67 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -62,7 +62,23 @@ to provide more features: After running your PHPUnit tests, you will get a report similar to this one: -.. image:: /_images/components/phpunit_bridge/report.png +.. code-block:: terminal + + $ phpunit -c app + PHPUnit by Sebastian Bergmann. + + Configuration read from /app/phpunit.xml.dist + ................. + + Time: 1.77 seconds, Memory: 5.75Mb + + OK (17 tests, 21 assertions) + + Remaining deprecation notices (2) + + getEntityManager is deprecated since Symfony 2.1. Use getManager instead: 2x + 1x in DefaultControllerTest::testPublicUrls from AppBundle\Tests\Controller + 1x in BlogControllerTest::testIndex from AppBundle\Tests\Controller The summary includes: diff --git a/translation/debug.rst b/translation/debug.rst index c5e18c0bc8e..71571ac3446 100644 --- a/translation/debug.rst +++ b/translation/debug.rst @@ -113,10 +113,16 @@ To inspect all messages in the ``fr`` locale for the AcmeDemoBundle, run: $ php app/console debug:translation fr AcmeDemoBundle -You will get this output: + +----------+-------------------+----------------------+-------------------------------+ + | State(s) | Id | Message Preview (fr) | Fallback Message Preview (en) | + +----------+-------------------+----------------------+-------------------------------+ + | o | Symfony2 is great | J'aime Symfony2 | Symfony2 is great | + +----------+-------------------+----------------------+-------------------------------+ -.. image:: /_images/translation/debug_1.png - :align: center + Legend: + x Missing message + o Unused message + = Same as the fallback message It shows you a table with the result when translating the message in the ``fr`` locale and the result when the fallback locale ``en`` would be used. On top @@ -128,8 +134,20 @@ because it is translated, but you haven't used it anywhere yet. Now, if you translate the message in one of your templates, you will get this output: -.. image:: /_images/translation/debug_2.png - :align: center +.. code-block:: terminal + + $ php app/console debug:translation fr AcmeDemoBundle + + +----------+-------------------+----------------------+-------------------------------+ + | State(s) | Id | Message Preview (fr) | Fallback Message Preview (en) | + +----------+-------------------+----------------------+-------------------------------+ + | | Symfony2 is great | J'aime Symfony2 | Symfony2 is great | + +----------+-------------------+----------------------+-------------------------------+ + + Legend: + x Missing message + o Unused message + = Same as the fallback message The state is empty which means the message is translated in the ``fr`` locale and used in one or more templates. @@ -137,8 +155,20 @@ and used in one or more templates. If you delete the message ``Symfony is great`` from your translation file for the ``fr`` locale and run the command, you will get: -.. image:: /_images/translation/debug_3.png - :align: center +.. code-block:: terminal + + $ php app/console debug:translation fr AcmeDemoBundle + + +----------+-------------------+----------------------+-------------------------------+ + | State(s) | Id | Message Preview (fr) | Fallback Message Preview (en) | + +----------+-------------------+----------------------+-------------------------------+ + | x = | Symfony2 is great | J'aime Symfony2 | Symfony2 is great | + +----------+-------------------+----------------------+-------------------------------+ + + Legend: + x Missing message + o Unused message + = Same as the fallback message The state indicates the message is missing because it is not translated in the ``fr`` locale but it is still used in the template. Moreover, the message @@ -149,8 +179,20 @@ the ``en`` locale. If you copy the content of the translation file in the ``en`` locale, to the translation file in the ``fr`` locale and run the command, you will get: -.. image:: /_images/translation/debug_4.png - :align: center +.. code-block:: terminal + + $ php app/console debug:translation fr AcmeDemoBundle + + +----------+-------------------+----------------------+-------------------------------+ + | State(s) | Id | Message Preview (fr) | Fallback Message Preview (en) | + +----------+-------------------+----------------------+-------------------------------+ + | = | Symfony2 is great | J'aime Symfony2 | Symfony2 is great | + +----------+-------------------+----------------------+-------------------------------+ + + Legend: + x Missing message + o Unused message + = Same as the fallback message You can see that the translations of the message are identical in the ``fr`` and ``en`` locales which means this message was probably copied from French