Dan Brown

Removed extension from translation script link

Also fixed bug causing EN translation backup to not be passed
to javascript translation system.

Closes #328
1 -<?php 1 +<?php namespace BookStack\Http\Controllers;
2 -
3 -namespace BookStack\Http\Controllers;
4 2
5 use Activity; 3 use Activity;
6 use BookStack\Repos\EntityRepo; 4 use BookStack\Repos\EntityRepo;
7 -use BookStack\Http\Requests;
8 use Illuminate\Http\Response; 5 use Illuminate\Http\Response;
9 use Views; 6 use Views;
10 7
...@@ -63,10 +60,10 @@ class HomeController extends Controller ...@@ -63,10 +60,10 @@ class HomeController extends Controller
63 ]; 60 ];
64 if ($locale !== 'en') { 61 if ($locale !== 'en') {
65 $enTrans = [ 62 $enTrans = [
66 - 'common' => trans('common', [], null, 'en'), 63 + 'common' => trans('common', [], 'en'),
67 - 'components' => trans('components', [], null, 'en'), 64 + 'components' => trans('components', [], 'en'),
68 - 'entities' => trans('entities', [], null, 'en'), 65 + 'entities' => trans('entities', [], 'en'),
69 - 'errors' => trans('errors', [], null, 'en') 66 + 'errors' => trans('errors', [], 'en')
70 ]; 67 ];
71 $translations = array_replace_recursive($enTrans, $translations); 68 $translations = array_replace_recursive($enTrans, $translations);
72 } 69 }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 <!-- Scripts --> 17 <!-- Scripts -->
18 <script src="{{ baseUrl('/libs/jquery/jquery.min.js?version=2.1.4') }}"></script> 18 <script src="{{ baseUrl('/libs/jquery/jquery.min.js?version=2.1.4') }}"></script>
19 <script src="{{ baseUrl('/libs/jquery/jquery-ui.min.js?version=1.11.4') }}"></script> 19 <script src="{{ baseUrl('/libs/jquery/jquery-ui.min.js?version=1.11.4') }}"></script>
20 - <script src="{{ baseUrl('/translations.js') }}"></script> 20 + <script src="{{ baseUrl('/translations') }}"></script>
21 21
22 @yield('head') 22 @yield('head')
23 23
......
1 <?php 1 <?php
2 2
3 -Route::get('/translations.js', 'HomeController@getTranslations'); 3 +Route::get('/translations', 'HomeController@getTranslations');
4 4
5 // Authenticated routes... 5 // Authenticated routes...
6 Route::group(['middleware' => 'auth'], function () { 6 Route::group(['middleware' => 'auth'], function () {
......