Skip to content

Commit

Permalink
Added translations!
Browse files Browse the repository at this point in the history
  • Loading branch information
sebacarrasco93 committed Jun 18, 2021
1 parent b8c2da5 commit 921cab1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 13 deletions.
8 changes: 8 additions & 0 deletions resources/lang/en/missing.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return [
'title' => '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',
];
8 changes: 8 additions & 0 deletions resources/lang/es/missing.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return [
'title' => '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',
];
37 changes: 24 additions & 13 deletions resources/views/notify/missing-route.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<title>Missing route</title>
<title>Laravel Payku | {{ trans('laravel-payku::missing.title') }}</title>
</head>
<body>
<h1>It works!</h1>
<header>
<img src="https://payku.cl/wp-content/uploads/2019/05/payku_2x.png" alt="">
<h1>{{ trans('laravel-payku::missing.it_works') }}</h1>
</header>

<div class="detail">
<div class="group">
Expand Down Expand Up @@ -34,43 +37,51 @@
</div>
</div>

{{-- @foreach ($result as $key => $item)
<div>{{ $key }}</div>
@endforeach --}}
<p>{{ trans('laravel-payku::missing.finished_1') }} "<strong>{{ $routeName }}</strong>", {{ trans('laravel-payku::missing.finished_2') }}</p>

<pre>{{ $result }}</pre>

<p>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</p>
</body>
</html>

<style>
@import('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
@import('https://fonts.googleapis.com/css2?family=Karla:wght@400;600&display=swap');
:root {
--color-one: #000036;
--color-two: #00E48C;
--color-three: #fff;
}
* {
margin: 0;
padding: 0;
}
html {
font-family: 'Poppins', sans-serif;
background: var(--color-one);
font-family: 'Karla', sans-serif;
background: #1b2032;
color: var(--color-three);
text-align: center;
}
header {
background: #4d39e9;
padding: 30px 40px;
display: flex;
justify-content: space-between;
}
h1 {
color: var(--color-two);
}
.detail {
background: var(--color-three);
color: var(--color-one);
display: grid;
grid-template-columns: 1fr 1fr 1fr;
border-radius: 5px;
padding: 5px;
padding: 50px 5px;
}
.group {
Expand All @@ -88,7 +99,7 @@
}
p {
background: var(--color-two);
color: #f8b526;
padding: 10px;
}
</style>
2 changes: 2 additions & 0 deletions src/LaravelPaykuServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 921cab1

Please sign in to comment.