File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public function index(Request $request)
1717 $ lang = $ request ->has ('locale ' ) ? $ request ->input ('locale ' ) : app ()->getLocale ();
1818 $ version = sharp_version ();
1919
20- $ strings = Cache::rememberForever ("sharp.lang. $ lang. $ version.js " , function () {
20+ $ strings = Cache::rememberForever ("sharp.lang. $ lang. $ version.js " , function () use ( $ lang ) {
2121 $ localizationStrings = [];
2222 $ files = [
2323 'action_bar ' ,
@@ -30,8 +30,8 @@ public function index(Request $request)
3030 ];
3131
3232 collect ($ files )
33- ->map (function (string $ filename ) {
34- return collect (trans ("sharp-front:: $ filename " ))
33+ ->map (function (string $ filename ) use ( $ lang ) {
34+ return collect (trans ("sharp-front:: $ filename " , [], $ lang ))
3535 ->mapWithKeys (function ($ value , $ key ) use ($ filename ) {
3636 return ["$ filename. $ key " => $ value ];
3737 })
You can’t perform that action at this time.
0 commit comments