From dc1be6039f32261a22ebc47d3d8f1a155b099fa3 Mon Sep 17 00:00:00 2001 From: Hatem Date: Fri, 8 Feb 2019 09:31:47 +0300 Subject: [PATCH] Update 4.2 deprecation The TranslatorInterface has been deprecated in favor of Symfony\Contracts\Translation\TranslatorInterface The Translator::transChoice() method has been deprecated in favor of using Translator::trans() with "%count%" as the parameter driving plurals --- translation.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/translation.rst b/translation.rst index bc2ee285d58..4f3056b1dba 100644 --- a/translation.rst +++ b/translation.rst @@ -119,7 +119,7 @@ of text (called a *message*), use the for example, that you're translating a simple message from inside a controller:: // ... - use Symfony\Component\Translation\TranslatorInterface; + use Symfony\Contracts\Translation\TranslatorInterface; public function index(TranslatorInterface $translator) { @@ -197,7 +197,7 @@ Message Placeholders Sometimes, a message containing a variable needs to be translated:: - use Symfony\Component\Translation\TranslatorInterface; + use Symfony\Contracts\Translation\TranslatorInterface; public function index(TranslatorInterface $translator, $name) { @@ -230,6 +230,11 @@ method or the ``transchoice`` tag/filter in your :ref:`template