File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -649,6 +649,39 @@ The translation of database content should be handled by Doctrine through
649
649
the `Translatable Extension `_. For more information, see the documentation
650
650
for that library.
651
651
652
+ Debugging Translations
653
+ ----------------------
654
+
655
+ .. versionadded :: 2.5
656
+ The ``translation:debug `` command was introduced in Symfony 2.5.
657
+
658
+ When maintaining a bundle, you may use or remove the usage of a translation
659
+ message without updating all message catalogues. The ``translation:debug ``
660
+ command helps you finding these missing or unused translation messages for a
661
+ given locale. It shows you a table with the result when translating the
662
+ message in the given locale and the result when the fallback would be used.
663
+ On top of that, it also shows you when the translation is the same as the
664
+ fallback translation (this could indicate that the message was not correctly
665
+ translated). To inspect all messages in the ``en `` locale for the AcmeDemoBundle, run:
666
+
667
+ .. code-block :: bash
668
+
669
+ $ php app/console translation:debug en AcmeDemoBundle
670
+
671
+ By default all domains are inspected, but it is possible to specify a single domain:
672
+
673
+ .. code-block :: bash
674
+
675
+ $ php app/console translation:debug en AcmeDemoBundle --domain=messages
676
+
677
+ You can also display only the unused or only the missing messages, by using
678
+ the ``--only-unused `` or ``--only-missing `` switches:
679
+
680
+ .. code-block :: bash
681
+
682
+ $ php app/console translation:debug en AcmeDemoBundle --only-unused
683
+ $ php app/console translation:debug en AcmeDemoBundle --only-missing
684
+
652
685
Summary
653
686
-------
654
687
You can’t perform that action at this time.
0 commit comments