From 921cab1704de00f4698335226889c2cdf540cff0 Mon Sep 17 00:00:00 2001 From: Seba Carrasco Poblete Date: Fri, 18 Jun 2021 07:54:58 -0400 Subject: [PATCH] Added translations! --- resources/lang/en/missing.php | 8 ++++ resources/lang/es/missing.php | 8 ++++ .../views/notify/missing-route.blade.php | 37 ++++++++++++------- src/LaravelPaykuServiceProvider.php | 2 + 4 files changed, 42 insertions(+), 13 deletions(-) create mode 100644 resources/lang/en/missing.php create mode 100644 resources/lang/es/missing.php diff --git a/resources/lang/en/missing.php b/resources/lang/en/missing.php new file mode 100644 index 0000000..23c1ba5 --- /dev/null +++ b/resources/lang/en/missing.php @@ -0,0 +1,8 @@ + 'Missing route', + 'it_works' => 'It works!', + 'finished_1' => 'Your order was finished! but if you want to show a nice view, you need to create a route with name', + 'finished_2' => 'to showing final result to your user', +]; diff --git a/resources/lang/es/missing.php b/resources/lang/es/missing.php new file mode 100644 index 0000000..8459956 --- /dev/null +++ b/resources/lang/es/missing.php @@ -0,0 +1,8 @@ + 'Falta una ruta', + 'it_works' => 'Funciona!', + 'finished_1' => 'Tu orden fue creada! pero si quieres agregar una hermosa vista, necesitas crear una ruta con el nombre', + 'finished_2' => 'para mostrar el resultado final a tu usuario', +]; diff --git a/resources/views/notify/missing-route.blade.php b/resources/views/notify/missing-route.blade.php index 9b89f9b..be38c04 100644 --- a/resources/views/notify/missing-route.blade.php +++ b/resources/views/notify/missing-route.blade.php @@ -2,10 +2,13 @@ - Missing route + Laravel Payku | {{ trans('laravel-payku::missing.title') }} -

It works!

+
+ +

{{ trans('laravel-payku::missing.it_works') }}

+
@@ -34,18 +37,15 @@
- {{-- @foreach ($result as $key => $item) -
{{ $key }}
- @endforeach --}} +

{{ trans('laravel-payku::missing.finished_1') }} "{{ $routeName }}", {{ trans('laravel-payku::missing.finished_2') }}

{{ $result }}
-

Your order was finished! but if you want to show a nice view, you need to create a route with name "{{ $routeName }}", to showing final result to your user

diff --git a/src/LaravelPaykuServiceProvider.php b/src/LaravelPaykuServiceProvider.php index b2dbceb..2f2897b 100644 --- a/src/LaravelPaykuServiceProvider.php +++ b/src/LaravelPaykuServiceProvider.php @@ -13,6 +13,8 @@ public function boot() $this->loadMigrationsFrom($this->basePath('database/migrations')); $this->loadViewsFrom($this->basePath('resources/views'), 'payku'); + + $this->loadTranslationsFrom($this->basePath('resources/lang'), 'laravel-payku'); $this->publishes([ $this->basePath('config/laravel-payku.php') => base_path('config/laravel-payku.php')