Merge pull request #1363 from pterodactyl/feature/remove-phraseapp

Remove phraseapp because we no longer use it
This commit is contained in:
Dane Everitt 2018-11-10 12:16:18 -08:00 committed by GitHub
commit d2991eafa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 4 additions and 135 deletions

View file

@ -1,29 +0,0 @@
phraseapp:
project_id: 94f8b39450cd749ae9c3cc0ab8cdb61d
file_format: laravel
push:
sources:
- file: ./resources/lang/<locale_code>/<tag>.php
pull:
targets:
- file: ./resources/lang/<locale_code>/auth.php
params:
tag: "auth"
- file: ./resources/lang/<locale_code>/base.php
params:
tag: "base"
- file: ./resources/lang/<locale_code>/pagination.php
params:
tag: "pagination"
- file: ./resources/lang/<locale_code>/passwords.php
params:
tag: "passwords"
- file: ./resources/lang/<locale_code>/server.php
params:
tag: "server"
- file: ./resources/lang/<locale_code>/strings.php
params:
tag: "strings"
- file: ./resources/lang/<locale_code>/validation.php
params:
tag: "validation"

View file

@ -41,8 +41,7 @@ In addition to our standard nest of supported games, our community is constantly
* Discord ATLBot * Discord ATLBot
## Credits ## 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 This software would not be possible without the work of other open-source authors who provide tools such as:
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), [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), [Bootstrap](http://getbootstrap.com), [Bootstrap Notify](http://bootstrap-notify.remabledesigns.com), [Chart.js](http://www.chartjs.org), [FontAwesome](http://fontawesome.io),

View file

@ -1,31 +0,0 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* 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}__}}";
}
}

View file

@ -1,44 +0,0 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* 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;
});
}
}

View file

@ -166,6 +166,7 @@ return [
Illuminate\Redis\RedisServiceProvider::class, Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class, Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class, Illuminate\View\ViewServiceProvider::class,
@ -179,7 +180,6 @@ return [
Pterodactyl\Providers\HashidsServiceProvider::class, Pterodactyl\Providers\HashidsServiceProvider::class,
Pterodactyl\Providers\RouteServiceProvider::class, Pterodactyl\Providers\RouteServiceProvider::class,
Pterodactyl\Providers\MacroServiceProvider::class, Pterodactyl\Providers\MacroServiceProvider::class,
Pterodactyl\Providers\PhraseAppTranslationProvider::class,
Pterodactyl\Providers\RepositoryServiceProvider::class, Pterodactyl\Providers\RepositoryServiceProvider::class,
Pterodactyl\Providers\ViewComposerServiceProvider::class, Pterodactyl\Providers\ViewComposerServiceProvider::class,

View file

@ -153,23 +153,10 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Language Editor | Client Features
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Set `PHRASE_IN_CONTEXT` to true to enable the PhaseApp in-context editor | Allow clients to create their own databases.
| 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.
*/ */
'client_features' => [ 'client_features' => [
'databases' => [ 'databases' => [

View file

@ -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);
})();

View file

@ -60,7 +60,5 @@
particlesJS.load('particles-js', '{!! Theme::url('vendor/particlesjs/particles.json?t={cache-version}') !!}', function() {}); particlesJS.load('particles-js', '{!! Theme::url('vendor/particlesjs/particles.json?t={cache-version}') !!}', function() {});
}) })
</script> </script>
@if(config('pterodactyl.lang.in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js?t={cache-version}') !!} @endif
</body> </body>
</html> </html>

View file

@ -286,9 +286,6 @@
{!! Theme::js('vendor/socketio/socket.io.v203.min.js?t={cache-version}') !!} {!! 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('vendor/bootstrap-notify/bootstrap-notify.min.js?t={cache-version}') !!}
{!! Theme::js('js/autocomplete.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) @if(Auth::user()->root_admin)
<script> <script>