Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4 from jsor/template

Fix js code for default domains
  • Loading branch information...
commit 372c229436379a1171e72bf206a522fa7846b5eb 2 parents 4b0ff04 + 6e02e1a
@willdurand willdurand authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Resources/views/exposeTranslation.js.twig
View
2  Resources/views/exposeTranslation.js.twig
@@ -1,5 +1,5 @@
$.ExposeTranslation.locale = '{{ locale }}';
-$.ExposeTranslation.defaultDomains = [{% for domain in defaultDomains %}{{ domain }},{% endfor %}];
+$.ExposeTranslation.defaultDomains = [{% if defaultDomains %}"{{ defaultDomains|join('", "')|raw }}"{% endif %}];
{% for domain, translations in messages %}
{% for key, message in translations %}
$.ExposeTranslation.add({{ (domain~":"~key)|json_encode|raw }}, {{ message|json_encode|raw }});
Please sign in to comment.
Something went wrong with that request. Please try again.