]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/HomeController.php
Preserve original display_name_attribute configuration values.
[bookstack] / app / Http / Controllers / HomeController.php
index e472503187a61db9f197ab6d2b4323a22009fe31..5a5f34e4a5ce0d61e37bc797cfe1350bb49a5ef0 100644 (file)
@@ -1,8 +1,7 @@
 <?php namespace BookStack\Http\Controllers;
 
 use Activity;
-use BookStack\Repos\EntityRepo;
-use Illuminate\Http\Request;
+use BookStack\Entities\Repos\EntityRepo;
 use Illuminate\Http\Response;
 use Views;
 
@@ -80,6 +79,7 @@ class HomeController extends Controller
     {
         $locale = app()->getLocale();
         $cacheKey = 'GLOBAL_TRANSLATIONS_' . $locale;
+
         if (cache()->has($cacheKey) && config('app.env') !== 'development') {
             $resp = cache($cacheKey);
         } else {
@@ -90,15 +90,6 @@ class HomeController extends Controller
                 'entities' => trans('entities'),
                 'errors' => trans('errors')
             ];
-            if ($locale !== 'en') {
-                $enTrans = [
-                    'common' => trans('common', [], 'en'),
-                    'components' => trans('components', [], 'en'),
-                    'entities' => trans('entities', [], 'en'),
-                    'errors' => trans('errors', [], 'en')
-                ];
-                $translations = array_replace_recursive($enTrans, $translations);
-            }
             $resp = 'window.translations = ' . json_encode($translations);
             cache()->put($cacheKey, $resp, 120);
         }