Fix phraseapp and move config location
This commit is contained in:
parent
a554f242a8
commit
da19749098
|
@ -47,7 +47,7 @@ class PhraseAppTranslationProvider extends TranslationServiceProvider
|
||||||
// configuration so we can easily get both of these values from there.
|
// configuration so we can easily get both of these values from there.
|
||||||
$locale = $app['config']['app.locale'];
|
$locale = $app['config']['app.locale'];
|
||||||
|
|
||||||
if ($app['config']['app.phrase_in_context']) {
|
if ($app['config']['pterodactyl.lang.in_context']) {
|
||||||
$trans = new PhraseAppTranslator($loader, $locale);
|
$trans = new PhraseAppTranslator($loader, $locale);
|
||||||
} else {
|
} else {
|
||||||
$trans = new IlluminateTranslator($loader, $locale);
|
$trans = new IlluminateTranslator($loader, $locale);
|
||||||
|
|
|
@ -6,8 +6,6 @@ return [
|
||||||
|
|
||||||
'version' => env('APP_VERSION', 'canary'),
|
'version' => env('APP_VERSION', 'canary'),
|
||||||
|
|
||||||
'phrase_in_context' => env('PHRASE_IN_CONTEXT', false),
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Debug Mode
|
| Application Debug Mode
|
||||||
|
|
|
@ -91,4 +91,16 @@ return [
|
||||||
'cache' => 60,
|
'cache' => 60,
|
||||||
'url' => 'https://cdn.pterodactyl.io/releases/latest.json',
|
'url' => 'https://cdn.pterodactyl.io/releases/latest.json',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Language Editor
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Set `PHRASE_IN_CONTEXT` to true to enable the PhaseApp in-context editor
|
||||||
|
| on this site which allows you to translate the panel, from the panel.
|
||||||
|
*/
|
||||||
|
'lang' => [
|
||||||
|
'in_context' => env('PHRASE_IN_CONTEXT', false),
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -60,6 +60,6 @@
|
||||||
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
|
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
|
||||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
|
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
|
||||||
|
|
||||||
@if(config('app.phrase_in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js') !!} @endif
|
@if(config('pterodactyl.lang.in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js') !!} @endif
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -278,8 +278,9 @@
|
||||||
{!! Theme::js('vendor/adminlte/app.min.js') !!}
|
{!! Theme::js('vendor/adminlte/app.min.js') !!}
|
||||||
{!! Theme::js('vendor/socketio/socket.io.min.js') !!}
|
{!! Theme::js('vendor/socketio/socket.io.min.js') !!}
|
||||||
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!}
|
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!}
|
||||||
|
@if(config('pterodactyl.lang.in_context'))
|
||||||
@if(config('app.phrase_in_context')) {!! Theme::js('js/phraseapp.js') !!} @endif
|
{!! Theme::js('vendor/phraseapp/phraseapp.js') !!}
|
||||||
|
@endif
|
||||||
@show
|
@show
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue