Skip to content

Commit

Permalink
Move TranslationServiceProvider to the publications package
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jan 10, 2023
1 parent 12970c6 commit 3070914
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'providers' => [
App\Providers\AppServiceProvider::class,
Hyde\Framework\HydeServiceProvider::class,
Hyde\Framework\Providers\TranslationServiceProvider::class,
\Hyde\Publications\Providers\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Hyde\Framework\Testing\Unit;

use Hyde\Framework\Providers\TranslationServiceProvider;
use Hyde\Publications\Providers\TranslationServiceProvider;
use Hyde\Testing\TestCase;

/**
* @covers \Hyde\Framework\Providers\TranslationServiceProvider
* @covers \Hyde\Publications\Providers\TranslationServiceProvider
*/
class TranslationServiceProviderTest extends TestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Hyde\Framework\Providers;
namespace Hyde\Publications\Providers;

use function config;
use Illuminate\Translation\TranslationServiceProvider as IlluminateTranslationServiceProvider;
Expand All @@ -16,7 +16,7 @@ public function register(): void
parent::register();

if (! is_dir(lang_path())) {
$this->app->useLangPath(__DIR__.'/../../../../publications/resources/lang');
$this->app->useLangPath(__DIR__.'/../../resources/lang');
}

config([
Expand All @@ -27,6 +27,6 @@ public function register(): void

public function boot(): void
{
$this->loadTranslationsFrom(__DIR__.'/../../../../publications/resources/lang/en/validation.php', 'validation');
$this->loadTranslationsFrom(__DIR__.'/../../resources/lang/en/validation.php', 'validation');
}
}

0 comments on commit 3070914

Please sign in to comment.