Permalink
Browse files

Merge pull request #4 from jsor/template

Fix js code for default domains
  • Loading branch information...
2 parents 4b0ff04 + 6e02e1a commit 372c229436379a1171e72bf206a522fa7846b5eb @willdurand willdurand committed Jul 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 }});

0 comments on commit 372c229

Please sign in to comment.