Skip to content

Commit da19749

Browse files
committed
Fix phraseapp and move config location
1 parent a554f24 commit da19749

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

app/Providers/PhraseAppTranslationProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function register()
4747
// configuration so we can easily get both of these values from there.
4848
$locale = $app['config']['app.locale'];
4949

50-
if ($app['config']['app.phrase_in_context']) {
50+
if ($app['config']['pterodactyl.lang.in_context']) {
5151
$trans = new PhraseAppTranslator($loader, $locale);
5252
} else {
5353
$trans = new IlluminateTranslator($loader, $locale);

config/app.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
'version' => env('APP_VERSION', 'canary'),
88

9-
'phrase_in_context' => env('PHRASE_IN_CONTEXT', false),
10-
119
/*
1210
|--------------------------------------------------------------------------
1311
| Application Debug Mode

config/pterodactyl.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,16 @@
9191
'cache' => 60,
9292
'url' => 'https://cdn.pterodactyl.io/releases/latest.json',
9393
],
94+
95+
/*
96+
|--------------------------------------------------------------------------
97+
| Language Editor
98+
|--------------------------------------------------------------------------
99+
|
100+
| Set `PHRASE_IN_CONTEXT` to true to enable the PhaseApp in-context editor
101+
| on this site which allows you to translate the panel, from the panel.
102+
*/
103+
'lang' => [
104+
'in_context' => env('PHRASE_IN_CONTEXT', false),
105+
],
94106
];

resources/themes/pterodactyl/layouts/auth.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@
6060
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
6161
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
6262

63-
@if(config('app.phrase_in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js') !!} @endif
63+
@if(config('pterodactyl.lang.in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js') !!} @endif
6464
</body>
6565
</html>

resources/themes/pterodactyl/layouts/master.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,9 @@ class="active"
278278
{!! Theme::js('vendor/adminlte/app.min.js') !!}
279279
{!! Theme::js('vendor/socketio/socket.io.min.js') !!}
280280
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!}
281-
282-
@if(config('app.phrase_in_context')) {!! Theme::js('js/phraseapp.js') !!} @endif
281+
@if(config('pterodactyl.lang.in_context'))
282+
{!! Theme::js('vendor/phraseapp/phraseapp.js') !!}
283+
@endif
283284
@show
284285
</body>
285286
</html>

0 commit comments

Comments
 (0)