fix locale in embed mode

This commit is contained in:
Simon Vieille 2015-11-24 22:41:59 +01:00
parent da0428369e
commit 29ace38c61
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
var div = document.getElementById('gist-{{ gist.file }}-{{ commit }}');
var iframeId = 'gist-' + (Math.floor(Math.random() * (10000 - 1)) + 1).toString();
var iframe = document.createElement('iframe');
var url = '{{ app.request.getSchemeAndHttpHost() ~ path('embed', app.request.attributes.get('_route_params')|merge({_locale: 'en'})) }}';
var url = '{{ app.request.getSchemeAndHttpHost() ~ path('embed', app.request.attributes.get('_route_params')) }}';
if (div.getAttribute('data-key')) {
url = [url, div.getAttribute('data-key')].join('');