Removed extension from translation script link

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

Closes #328
This commit is contained in:
Dan Brown 2017-03-05 14:10:55 +00:00
parent bcafa73faf
commit 36173eb47d
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
3 changed files with 7 additions and 10 deletions

View File

@ -1,10 +1,7 @@
<?php
namespace BookStack\Http\Controllers;
<?php namespace BookStack\Http\Controllers;
use Activity;
use BookStack\Repos\EntityRepo;
use BookStack\Http\Requests;
use Illuminate\Http\Response;
use Views;
@ -63,10 +60,10 @@ class HomeController extends Controller
];
if ($locale !== 'en') {
$enTrans = [
'common' => trans('common', [], null, 'en'),
'components' => trans('components', [], null, 'en'),
'entities' => trans('entities', [], null, 'en'),
'errors' => trans('errors', [], null, 'en')
'common' => trans('common', [], 'en'),
'components' => trans('components', [], 'en'),
'entities' => trans('entities', [], 'en'),
'errors' => trans('errors', [], 'en')
];
$translations = array_replace_recursive($enTrans, $translations);
}

View File

@ -17,7 +17,7 @@
<!-- Scripts -->
<script src="{{ baseUrl('/libs/jquery/jquery.min.js?version=2.1.4') }}"></script>
<script src="{{ baseUrl('/libs/jquery/jquery-ui.min.js?version=1.11.4') }}"></script>
<script src="{{ baseUrl('/translations.js') }}"></script>
<script src="{{ baseUrl('/translations') }}"></script>
@yield('head')

View File

@ -1,6 +1,6 @@
<?php
Route::get('/translations.js', 'HomeController@getTranslations');
Route::get('/translations', 'HomeController@getTranslations');
// Authenticated routes...
Route::group(['middleware' => 'auth'], function () {