From 98ab0f9fbb76e4125b7849ea15885b87f1088959 Mon Sep 17 00:00:00 2001 From: baptiste Date: Thu, 3 Nov 2016 17:39:09 +0100 Subject: [PATCH] fix translation filter --- Resources/views/toastr.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/views/toastr.html.twig b/Resources/views/toastr.html.twig index 83696aa..a4f740c 100644 --- a/Resources/views/toastr.html.twig +++ b/Resources/views/toastr.html.twig @@ -27,7 +27,7 @@ hideMethod : '{{ options.hideMethod|default('fadeOut') }}' }; - var body = "{{ body|replace('\r\n|\n|\r', '
')|raw }}"; + var body = "{{ body|replace('\r\n|\n|\r', '
')|raw|trans({}, translationDomain|default('messages'))) }}"; delay({% if timeout is defined and timeout != null %} {{ timeout }}{% else %} 1000{% endif %} , function() { return toastr.{{ type }}(body,"{{ title|default(("alert."~type~".label")|trans({}, translationDomain|default('messages'))) }}"); });