File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -180,3 +180,33 @@ unused or only the missing messages, by using the ``--only-unused`` or
180
180
181
181
$ php bin/console debug:translation en --only-unused
182
182
$ php bin/console debug:translation en --only-missing
183
+
184
+ Debug Command Exit Codes
185
+ ------------------------
186
+
187
+ The exit code of the ``debug:translation `` command changes depending on the
188
+ status of the translations. Use the following public constants to check it::
189
+
190
+ use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
191
+
192
+ // generic failure (e.g. there are no translations)
193
+ TranslationDebugCommand::EXIT_CODE_GENERAL_ERROR;
194
+
195
+ // there are missing translations
196
+ TranslationDebugCommand::EXIT_CODE_MISSING;
197
+
198
+ // there are unused translations
199
+ TranslationDebugCommand::EXIT_CODE_UNUSED;
200
+
201
+ // some translations are using the fallback translation
202
+ TranslationDebugCommand::EXIT_CODE_FALLBACK;
203
+
204
+ These constants are defined as "bit masks", so you can combine them as follows::
205
+
206
+ if (TranslationDebugCommand::EXIT_CODE_MISSING | TranslationDebugCommand::EXIT_CODE_UNUSED) {
207
+ // ... there are missing and/or unused translations
208
+ }
209
+
210
+ .. versionadded :: 5.1
211
+
212
+ The exit codes were introduced in Symfony 5.1
You can’t perform that action at this time.
0 commit comments