diff --git a/.phraseapp.yml b/.phraseapp.yml deleted file mode 100644 index 007c00ebb..000000000 --- a/.phraseapp.yml +++ /dev/null @@ -1,29 +0,0 @@ -phraseapp: - project_id: 94f8b39450cd749ae9c3cc0ab8cdb61d - file_format: laravel - push: - sources: - - file: ./resources/lang//.php - pull: - targets: - - file: ./resources/lang//auth.php - params: - tag: "auth" - - file: ./resources/lang//base.php - params: - tag: "base" - - file: ./resources/lang//pagination.php - params: - tag: "pagination" - - file: ./resources/lang//passwords.php - params: - tag: "passwords" - - file: ./resources/lang//server.php - params: - tag: "server" - - file: ./resources/lang//strings.php - params: - tag: "strings" - - file: ./resources/lang//validation.php - params: - tag: "validation" diff --git a/README.md b/README.md index 1bc66ca2c..5831a8709 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,7 @@ In addition to our standard nest of supported games, our community is constantly * Discord ATLBot ## Credits -A huge thank you to [PhraseApp](https://phraseapp.com) who provide us the software to help translate this project. This software would not be possible -without the work of other open-source authors who provide tools such as: +This software would not be possible without the work of other open-source authors who provide tools such as: [Ace Editor](https://ace.c9.io), [AdminLTE](https://almsaeedstudio.com), [Animate.css](http://daneden.github.io/animate.css/), [AnsiUp](https://github.com/drudru/ansi_up), [Async.js](https://github.com/caolan/async), [Bootstrap](http://getbootstrap.com), [Bootstrap Notify](http://bootstrap-notify.remabledesigns.com), [Chart.js](http://www.chartjs.org), [FontAwesome](http://fontawesome.io), diff --git a/app/Extensions/PhraseAppTranslator.php b/app/Extensions/PhraseAppTranslator.php deleted file mode 100644 index 145f60392..000000000 --- a/app/Extensions/PhraseAppTranslator.php +++ /dev/null @@ -1,31 +0,0 @@ -. - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ - -namespace Pterodactyl\Extensions; - -use Illuminate\Translation\Translator as LaravelTranslator; - -class PhraseAppTranslator extends LaravelTranslator -{ - /** - * Get the translation for the given key. - * - * @param string $key - * @param array $replace - * @param string|null $locale - * @param bool $fallback - * @return string - */ - public function get($key, array $replace = [], $locale = null, $fallback = true) - { - $key = substr($key, strpos($key, '.') + 1); - - return "{{__phrase_${key}__}}"; - } -} diff --git a/app/Providers/PhraseAppTranslationProvider.php b/app/Providers/PhraseAppTranslationProvider.php deleted file mode 100644 index 1365bd021..000000000 --- a/app/Providers/PhraseAppTranslationProvider.php +++ /dev/null @@ -1,44 +0,0 @@ -. - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ - -namespace Pterodactyl\Providers; - -use Pterodactyl\Extensions\PhraseAppTranslator; -use Illuminate\Translation\TranslationServiceProvider; -use Illuminate\Translation\Translator as IlluminateTranslator; - -class PhraseAppTranslationProvider extends TranslationServiceProvider -{ - /** - * Register the service provider. - */ - public function register() - { - $this->registerLoader(); - - $this->app->singleton('translator', function ($app) { - $loader = $app['translation.loader']; - - // When registering the translator component, we'll need to set the default - // locale as well as the fallback locale. So, we'll grab the application - // configuration so we can easily get both of these values from there. - $locale = $app['config']['app.locale']; - - if ($app['config']['pterodactyl.lang.in_context']) { - $trans = new PhraseAppTranslator($loader, $locale); - } else { - $trans = new IlluminateTranslator($loader, $locale); - } - - $trans->setFallback($app['config']['app.fallback_locale']); - - return $trans; - }); - } -} diff --git a/config/app.php b/config/app.php index a92ab0362..f5bb491ae 100644 --- a/config/app.php +++ b/config/app.php @@ -166,6 +166,7 @@ return [ Illuminate\Redis\RedisServiceProvider::class, Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, Illuminate\Session\SessionServiceProvider::class, + Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, @@ -179,7 +180,6 @@ return [ Pterodactyl\Providers\HashidsServiceProvider::class, Pterodactyl\Providers\RouteServiceProvider::class, Pterodactyl\Providers\MacroServiceProvider::class, - Pterodactyl\Providers\PhraseAppTranslationProvider::class, Pterodactyl\Providers\RepositoryServiceProvider::class, Pterodactyl\Providers\ViewComposerServiceProvider::class, diff --git a/config/pterodactyl.php b/config/pterodactyl.php index e06c709ef..54be4346d 100644 --- a/config/pterodactyl.php +++ b/config/pterodactyl.php @@ -153,23 +153,10 @@ return [ /* |-------------------------------------------------------------------------- - | Language Editor + | Client Features |-------------------------------------------------------------------------- | - | 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), - ], - - /* - |-------------------------------------------------------------------------- - | 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. + | Allow clients to create their own databases. */ 'client_features' => [ 'databases' => [ diff --git a/public/themes/pterodactyl/vendor/phraseapp/phraseapp.js b/public/themes/pterodactyl/vendor/phraseapp/phraseapp.js deleted file mode 100644 index a11a22655..000000000 --- a/public/themes/pterodactyl/vendor/phraseapp/phraseapp.js +++ /dev/null @@ -1,8 +0,0 @@ -window.PHRASEAPP_CONFIG = { - projectId: '94f8b39450cd749ae9c3cc0ab8cdb61d' -}; -(function() { - var phraseapp = document.createElement('script'); phraseapp.type = 'text/javascript'; phraseapp.async = true; - phraseapp.src = ['https://', 'phraseapp.com/assets/in-context-editor/2.0/app.js?', new Date().getTime()].join(''); - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(phraseapp, s); -})(); diff --git a/resources/themes/pterodactyl/layouts/auth.blade.php b/resources/themes/pterodactyl/layouts/auth.blade.php index 0157864eb..108e1311f 100644 --- a/resources/themes/pterodactyl/layouts/auth.blade.php +++ b/resources/themes/pterodactyl/layouts/auth.blade.php @@ -60,7 +60,5 @@ particlesJS.load('particles-js', '{!! Theme::url('vendor/particlesjs/particles.json?t={cache-version}') !!}', function() {}); }) - - @if(config('pterodactyl.lang.in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js?t={cache-version}') !!} @endif diff --git a/resources/themes/pterodactyl/layouts/master.blade.php b/resources/themes/pterodactyl/layouts/master.blade.php index 15d88b96b..f83a6f151 100644 --- a/resources/themes/pterodactyl/layouts/master.blade.php +++ b/resources/themes/pterodactyl/layouts/master.blade.php @@ -286,9 +286,6 @@ {!! Theme::js('vendor/socketio/socket.io.v203.min.js?t={cache-version}') !!} {!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js?t={cache-version}') !!} {!! Theme::js('js/autocomplete.js?t={cache-version}') !!} - @if(config('pterodactyl.lang.in_context')) - {!! Theme::js('vendor/phraseapp/phraseapp.js?t={cache-version}') !!} - @endif @if(Auth::user()->root_admin)