In the debug mode the translator service will return LoggableTranslator instead of Translator class then  it will fail if the user call for example:
```php
$this->get('translator')->getLocale()